sn1per
03-31-2008, 09:00 AM
Why does $filex return nothing after i use it in my IMG tag after the WHILE and how can i get it to return after the WHILE? I'm stuck.
the file names are like thispicture-photo28.jpg
$perPage = 1;
$page = $_GET['page'];
if (is_numeric($page)) $start=(($page-1)*$perPage);
$handle = opendir ('./');
while (false !== ($filex = readdir($handle))) {
if($filex != "." && $filex != ".." && $filex != basename(__FILE__)) {
$countr++;
if ($countr>$start) {
if ( ($countr-$start)<=$perPage ) {
echo '<center><img src="'.$filex.'"/></center>';
}
}
}
}
$filex= substr($filex, 0, -4);
echo rating_bar($filex, '10') ;
the file names are like thispicture-photo28.jpg
$perPage = 1;
$page = $_GET['page'];
if (is_numeric($page)) $start=(($page-1)*$perPage);
$handle = opendir ('./');
while (false !== ($filex = readdir($handle))) {
if($filex != "." && $filex != ".." && $filex != basename(__FILE__)) {
$countr++;
if ($countr>$start) {
if ( ($countr-$start)<=$perPage ) {
echo '<center><img src="'.$filex.'"/></center>';
}
}
}
}
$filex= substr($filex, 0, -4);
echo rating_bar($filex, '10') ;