sort array of numbers

liderbug

New member
Creating a calendar. (index.php) First thing: (mysql) create a 2dim array (day)(event). event is "hour|priority|date|text" Then for each day pass myarr[$day] and sort so that text is displayed in time order. The array is generated via $myarr[$day][] .= "$H|$r[2]|$r[0]|$r[1]|$r[3]";
print_r ($myarr);
Array
(
[0] => 17|2|1690930800|Karate in the Forest|1
[1] => 10|2|1690905600|Essentrics with Karen|1
[2] => 17|1|1688513400|BSA Weekly Meeting|2
[3] => 13|2|1624388400|Advanced Line Dancing|1
)
When I pass myarr[$day] to the display function it displays the calendar just fine, however out of order (see above). I need it to be: 10|2, 13|2, 17|1, 17|2. When I add "sort ($passedarray) - it crashes. Twisty little passages all alike...
Thanks.
 
Back
Top