Home >> PHP >> Numeric array in PHP

Numeric array in PHP

Numeric array is an array with a numeric index, values are stored and accessed in linear.Thease array can store number, string and object but their index will be numbers.

By default array index starts from zero.


foreach($num as $value){
         echo "value is ".$value."<br/>";


value is 1
value is 2
value is 3
value is 4
value is 5

Post Your Comment

Next Questions
Associate array
Multidimensional array
array() function
array_change_key_case() function
array_chunk() function
array_combine() function
array_count_values() function
array_diff() function
array_diff_assoc() function
array_diff_key() function
array_diff_uassoc() function
array_diff_ukey() function
array_fill() function
array_filter() function
array_flip() function
array_intersect() function
array_intersect_assoc() function
array_intersect_key() function
array_intersect_uassoc() function
array_intersect_ukey() function
array_key_exits() function
array_keys() function
array_map() function
array_merge() function
array_merge_recursive() function

Copyright ©2022 coderraj.com. All Rights Reserved.