Array Terminology In PHP


<?php// Create a  array in PHP . 

$array = array(12345);
print_r($array); // prient array value HERE
echo '
 unset array 
;// Now unset all array element
foreach ($array as $i => $value) {
unset(
$array[$i]);

}//print_r($array);

// Append an item (after $array[4] , next value store in $array[5] ).echo '
 echo appending array 
;

$array[] = 6;print_r($array);
// Restart index

echo '
 echo Restart index array 

$array array_values($array);
$array[] = 7;
print_r($array);?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s