marcushjortsberg Posted April 8, 2011 Share Posted April 8, 2011 I found this <?php $shop = array( array("rose", 1.25 , 15), array("daisy", 0.75 , 25), array("orchid", 1.15 , 7) ); ?> but I need the second levels arrays to be dynamic, how do I do that?? Like <?php $shop = array( array(1, 2 , 3), array(2, 2 , 3), array(3, 2 , 3), array(4, 2 , 3), ..., array(n, 2 , 3) ); ?> Link to comment https://forums.phpfreaks.com/topic/233070-for-in-array/ Share on other sites More sharing options...
betterphp Posted April 8, 2011 Share Posted April 8, 2011 I don't really understand the question here... You can add an element like this $shop[] = array(1, 2, 3); Link to comment https://forums.phpfreaks.com/topic/233070-for-in-array/#findComment-1198767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.