Getting array size
$arr = array();
for( $i = 0; $i < 3; $i++ )
{
$arr[ $i ] ="- This is element $i
";
}
foreach( $arr as $value )
{
echo($value);
}
$size = count( $arr );
echo( "- Total number of elements is $size
" );
?>