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

void* and sizeof()
Hi,

Using void* and sizeof is it possible to get the value of the object ?

I understan

update sql when refresh - php
hi
I have made a table (attachement)

the users can update the sql database using + or x bu

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

Not reloading page after php form submit
Hello helpful souls out there. You guys have come through for me in the recent past and I'm hoping s

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