aj123cd Posted March 18, 2012 Share Posted March 18, 2012 how to create multidimensional array in php Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/ Share on other sites More sharing options...
Mahngiel Posted March 18, 2012 Share Posted March 18, 2012 make an array inside an array Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328816 Share on other sites More sharing options...
aj123cd Posted March 18, 2012 Author Share Posted March 18, 2012 like this $user=array( $name=array(), $email=array()); show me some exampls Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328817 Share on other sites More sharing options...
Mahngiel Posted March 18, 2012 Share Posted March 18, 2012 Step 1: Read my signature Step 2: Try the PHP manual. Step 3: Search this forum Step 4: Google. Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328819 Share on other sites More sharing options...
aj123cd Posted March 18, 2012 Author Share Posted March 18, 2012 Thank u,I have tried all of them I could not find the answer Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328821 Share on other sites More sharing options...
Mahngiel Posted March 18, 2012 Share Posted March 18, 2012 Multi-arrays are just ways to assign info about particular values to said value. First Array $sports = array('football', 'soccer', 'baseball'); Second Array $sport['football']['stuff'] = array('stuff', 'to', 'go', 'in', 'this', 'array'); // or foreach foreach($sports as $sport): $sport['stuff'] = array('stuff', 'to', 'go', 'in', 'this', 'array'); endforeach; Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328822 Share on other sites More sharing options...
aj123cd Posted March 18, 2012 Author Share Posted March 18, 2012 thank u its great help Link to comment https://forums.phpfreaks.com/topic/259214-how-to-create-multidimensional-array-in-php/#findComment-1328824 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.