aj123cd Posted March 18, 2012 Share Posted March 18, 2012 how to create multidimensional array in php Quote 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 Quote 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 Quote 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. Quote 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 Quote 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; Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.