Use the index in square brackets to create new elements and or assign values : Array Element : Data Structure PHP Source Code


PHP Source Code » Data Structure » Array Element »

 

Use the index in square brackets to create new elements and or assign values



<?
$myarray = array('one', 2'three');

$myarray[1'two';
$myarray[3'four';

echo($myarray[0]);
echo($myarray[1]);
echo($myarray[2]);
echo($myarray[3]);
?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Data Structure
» Array Element