Woops!

I actually got the listing to work by replacing $photos = file($retVal);
with $photos = $retVal; :)

But, there´s still a problem. The script doesn´t seem to be able to use the
navigation part (print out the next and previous links). That part of the
script looks like this:

<?PHP
//print out navigation links
if(($start == 0) && ($next_start < $total_photos)){

//you're at the beginning of the photo gallery

?>

  <font face="arial, helvetica" size="2"><b>
  <a href="galleri.php?start=<?PHP print($next_start);?>">next page</a>
  </font></b>


<?PHP
}
elseif (($start > 0) && ($next_start < $total_photos)){

//you're in the middle of the photo gallery

?>

  <font face="arial, helvetica" size="2">
  <b><font color="#FF0000">&#171;</font>
  <a href="galleri.php?start=<?PHP print($prev_start); ?>">prev
page</a></b></font>
  <b>|</b>
  <font face="arial, helvetica" size="2">
  <b><a href="galleri.php?start=<?PHP print($next_start); ?>">next page</a>
<font
  color="#FF0000">&#187;</font></b></font>

<?PHP
}
elseif(($start == 0) && ($next_start > $total_photos)){

//you're in a photo gallery with only one page of photos

?>

<?PHP
}
else {

//you're at the end of the photo galley

?>
  <font face="arial, helvetica" size="2">
  <b><font color="#FF0000">&#171;</font>
  <a href="galleri.php?start=<?PHP print($prev_start); ?>">prev
page</a></b></font>
<?PHP
}
?>

> -----Original Message-----
> From: _lallous [mailto:[EMAIL PROTECTED]]
> Sent: den 18 september 2001 13:46
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Replacing datafile with array
>
>
> works like a charm....
>
> just initializet the $retVal function...
>
> $retVal = array();
> rest of script here....
>
> "Daniel alsén" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > i am trying to replace a datafile wich contains the contents of a
> directory
> > with an array.
> > I am reading the directory and am trying to pass the value to an array.
> What
> > am i doing wrong? Shouldn´t $retVal contain the direcory info?
> >
> > Also, is there a way to use the content of an array without getting the
> word
> > 'Array' at the start?
> >
> > $handle=opendir('.');
> > while (false !== ($file = readdir($handle)))
> >
> > if ($file != "." && $file != ".." && ereg(".jpg",$file)) {
> >
> > $retVal[count($retVal)] = $file;
> >
> > }
> >
> > # Daniel Alsén    | www.mindbash.com #
> > # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> > # ICQ: 63006462   |                  #
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to