Hello, I'm new to the forums. I need some help on a small php program that I'm writing. I've created an associative array that contains of names and states of private schools in the USA. Here is the code that I have so far.
<?php
include ("Q04print.php");
$myarray = array("Andrews" =>"MI","La Sierra" => "CA", "Oakwood" => "AL", "Pacific Union" => "CA", "SOUTHERN" => "TN", "Southwestern" => "TX", "Union" => "NE", "Walla Walla" => "WA", "Washington" => "MD");
ksort($myarray);
asort($myarray);
foreach ($myarray as $x => $y) {
print "<br />" . $x . " " . $y . "<br />";
}
?>
Now, I need to create a separate php file, with a function that prints the array showing institutions and states
It will print the function to print the table, in state order (Institution and state)
It will print the function to print the table, in institution order (Institution and state)
I'm still a newbie in php so your assistance would be greatly appreciated. Thanks!