Wednesday, 28 January 2015

Array Declaration

In php Array declare as below:

<?php

// define an array
$firstarray = array('firstelement', 'secondelement', 'thirdelement', 'etc..');
print_r($firstarray);
// printout  Array ( [0] => firstelement [1] => secondelement [2] => thirdelement [3] => etc.. )

?>

No comments: