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 ?> Link to comment https://forums.phpfreaks.com/topic/101788-adding-to-an-array/ Share on other sites More sharing options...
phpretard Posted April 18, 2008 Share Posted April 18, 2008 How do want to add them? Link to comment https://forums.phpfreaks.com/topic/101788-adding-to-an-array/#findComment-520795 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 Link to comment https://forums.phpfreaks.com/topic/101788-adding-to-an-array/#findComment-520796 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.