Interpret Order


Posted on 16th Feb 2014 07:03 pm by admin

Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' => $this->RenderOne()
,'two' => $this->RenderTwo()
);

Would php call the function $this->RenderOne() on assignment of $switch or does it call the function when $switch['one'] is used?

I'd like it if the function is called when $switch['one'] is used.

I know I can easily use a switch statement to get the desired behaviour. I was just curious as to how it got interpreted in this case.

Thanks in advance

No comments posted yet

Your Answer:

Login to answer
82 Like 21 Dislike
Previous forums Next forums
Other forums

Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c

onclick problem
I have <input type="text" name="message">
<a href=page2.

help with image text
Hi ...

see i need the text of the name and number to start in the center and always be in the

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

Character Sets/Collations Stuff
Can someone please give me a check list of things I must do to setup all the charset stuff for my ph

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash