Php end
From w3cyberlearnings
Contents |
PHP function end
This function points to the last element of the array.
Syntax end
- array: array input
end(array);
Example 1
<?php $name = array('bob', 'john', 'lilo'); echo end($name); ?>
Output
lilo
Example 2
<?php $name_score = array( 'Ella' => 30, 'Amelia' => 2, 'Liam' => 21 ); echo end($name_score); ?>
Output
21
Related Links
- array_change_key_case
- array_chunk
- array_combine
- array_count_values
- array_diff_assoc
- array_diff_key
- array_diff_uassoc
- array_diff_ukey
- array_diff
- array_fill_keys
- array_fill
- array_filter
- array_flip
- array_intersect_assoc
- array_intersect_key
- array_intersect_uassoc
- array_intersect_ukey
- array_intersect
- array_key_ exists
- array_keys