Hi,
I am having problems trying to sort data that I retrieve from a database and then store in four arrays.
This is what I have so far:
$query = "select * from policyfiles where filename='$file'";
$returned = mysql_query($query, $connection);
$rows = mysql_num_rows($returned);
$array = mysql_fetch_array($returned);
$titleArray[$counter] = $array[1];
$reviewdateArray[$counter] = $array[2];
$statusArray[$counter] = $array[3];
$fileArray[$counter] = $array[0];
Is there a better way to store this info in preferably only one array? I did try a 4D array, but I got confused when trying to retrieve data from it!
Also, with the setup above, is there anyway I can sort all the arrays alphabetically, because if I did them one at a time, they would all lose their correct placings within the array.
Many thanks for any help,
Nathan