I saw how some php script examples can use the function one after another, but I cannot find how to write a script like this.
When I write a php script:
class apple { function banana() { echo 'Hi!'; } }
It looks like this when I want to call the banana function:
$apple = new apple; $apple->banana();
What if I want to call a function immediately after the previous one, for example:
$ apple trees> banana () → orange ()
I tried to put the function inside another, but it returns with an error. How can I write a script as follows?
source share