wrathican Posted April 18, 2008 Share Posted April 18, 2008 how do i add values to an empty array? <?php $myarray = array(); //add value into an array ?> Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 18, 2008 Share Posted April 18, 2008 How do want to add them? Quote Link to comment Share on other sites More sharing options...
dptr1988 Posted April 18, 2008 Share Posted April 18, 2008 <?php // You can add values and keys like this $myarray['key_1'] = "some value"; // Or you just append a value to the array like this $myarray[] = "some value"; ?> Goto http://us.php.net/manual/en/language.types.array.php for more details Quote Link to comment 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.