Web lists-archives.com

[PHP] Re: PHP Functions




Sorry for the spam people. Looks like I was echoing $vehicleOutput() instead of $vehiclesOutput() with an "s".

Still, if this is the incorrect way of doing this please let me know. 
I want to plan my code so others can work with it with "some" ease.

TIA

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com



On Oct 31, 2015, at 3:08 AM, Karl DeSaulniers <karl@xxxxxxxxxxxxxxx> wrote:

> 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
> 
> 
>