Jump to content

Array of arrays


Xu Wei Jie

Recommended Posts

Hi

 

You can take a load of parameters to a function, and just set each to have a default value:-

 

function fred ($parm1 = "some default value", $parm2= "another default value", etc).

 

OK if you have a few possible parameters but useles if you have an effectively infinite number of them.

 

If you want to pass an array then just have a single parameter in the function declare . That will just have the array (or array of arrays) assigned to it.

 

All the best

 

Keith

Link to comment
https://forums.phpfreaks.com/topic/149212-array-of-arrays/#findComment-783602
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.