60 likes | 162 Views
Using Arrays Part II. Sorting Arrays. Sorting Example. This example creates an array containing student names (indexes) and their grades (values) then the array is sorted by grade then by student name. Script 7.5 (sort.php). Transforming Between Strings and Arrays.
E N D
Sorting Example • This example creates an array containing student names (indexes) and their grades (values) then the array is sorted by grade then by student name. • Script 7.5 (sort.php)
Transforming Between Strings and Arrays • implode() turns an array into a string • explode() turns a string into an array
Example • Script 7.7 (handle_list.php)
Creating an Array from a Form • 7.8 (event.html) • Script 7.9 (handle_event.php)