Hello,
i have used the search function but could not find something that really helps me. i am rather new to php too π
would be nice if someone could help me.
here is the situation..
i am reading variables (arrays) from a text file
07/03/04|name2|23|No|Yes|36|Yes|23|.|.|.|.|.|.|
07/04/04|name5|24|No|Yes|7|Yes|No|.|.|.|.|.|.|
07/02/04|name6|67|No|No|16|Yes|25|.|.|.|.|.|.|
07/04/04|name1|31|No|Yes|7|Yes|No|.|.|.|.|.|.|
my current script can read those datas and put them into a table using this (shorter version without tables):
<?
$results = array();
$file = file("data.txt");
foreach($file as $f) {
$data = explode("|",$f);
$results[$data[0]] = array("domain" => $data[1], "alexal" => $data[2], "alexar" => $data[3], "adult" => $data[4], "msn" => $data[5], "yahoo" => $data[6], "alta" => $data[7]);
echo "$data[0] $data[1] $data[2] $data[3];
}
?>
now, what i want is, to get my results sorted in a table...
should be sorted for date (data[0])
or name (data[1])
can anyone add this function to my current script, if that is possible?
thanks alot pals
RenΓΒ©