Jump to content

creating an array with certain specs?


Michdd

Recommended Posts

If I have 2 variables, $x and $y and I want to make a mutli-dimensional array that matches those. For example say $x = 5; and $y = 6; then I want my contents of the array to look like this:

[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]

 

All filled with 0s but with the right specs..

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/147502-creating-an-array-with-certain-specs/
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.