PHP Functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,
Given the following function writing technique.

$vehiclesOutput = function($newVhcls=array(), $header=true) {
	...
};

Everything was ok till I put another function in below it in a similar fashion. 
(Assigning the function to a variable like so) 

Then I got this error.

Function name must be a string

but only on the second function and not all the time. It's weird.

My first question is obvious. Am I doing this wrong?
I got this way of writing functions from another coder online in my researching.
So this is not my creation per se. I know about declaring function before the name way as well, just liked this style better I guess.
If it is the correct way, what is happening?

Sorry if this is a newbie question, but I haven't fully molted yet.
If there is a doc I should be looking at, please provide gently if you could.

TIA

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux