Jump to content

php multi array


vurentjie

Recommended Posts

hi just a simple question,

 

in php if i create a multidimensional numeric array for example,

 

$array[0][1] = "this";

$array[3][0] = "that";

$array[5][0] = "something";

 

would the inbetween array elements also be created (ie $array[1],$array[2],$array[4]) as empty array elements?

 

or would it be the same as normal text array like,

 

$array['zero'][1] = "this";

$array['three'][0] = "that";

$array['five'][0] = "something";

 

where no inbetween array elements are created, ie there is no $array['four']

 

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/105264-php-multi-array/
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.