Hi there,
I am trying to sort the contents of an array in date order...it sort of works! ....but the problem is when i include a new file it does not display it on top of list, also it displays 2 empty rows! (the list is within a form using checkbox)...the text files are saved as the date created ie 09022002.
PLEASE HELP......here's my code:
<?php
$date = date("dmY"
$handle=opendir('results');
$array=array();
while (($array[] = readdir($handle))!==false);
arsort($array,SORT_STRING);
closedir($handle);
while(list(,$value)=each($array)){
if ($value != '.' || $value != '..') {
print ("<tr><td valign=top align=left><input type=checkbox name=del[] value=${value}>
</td>"
@include("results/$value"
print ("</tr>"
}
}
?>
I am trying to sort the contents of an array in date order...it sort of works! ....but the problem is when i include a new file it does not display it on top of list, also it displays 2 empty rows! (the list is within a form using checkbox)...the text files are saved as the date created ie 09022002.
PLEASE HELP......here's my code:
<?php
$date = date("dmY"
$handle=opendir('results');
$array=array();
while (($array[] = readdir($handle))!==false);
arsort($array,SORT_STRING);
closedir($handle);
while(list(,$value)=each($array)){
if ($value != '.' || $value != '..') {
print ("<tr><td valign=top align=left><input type=checkbox name=del[] value=${value}>
</td>"
@include("results/$value"
print ("</tr>"
}
}
?>