Re: Spliting and Formating
| From: | php3 at developersdesk dot com | Date: | Thu, 27 Jul 2000 08:10:37 +0000 |
| Subject: | Re: Spliting and Formating | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8487@lists.php.net to get a copy of this message | ||
Addressed to: "Nathan Purciful" <npurciful@hotmail.com>
php-general@lists.php.net
rwidmer@developersdesk.com
** Reply to note from "Nathan Purciful" <npurciful@hotmail.com> Wed, 26 Jul 2000
22:41:40 -0500
>
> I have a problem and maybe you can help me out.
>
> $folder = "Family/Purciful/Nathan/";
>
> needs to become:
>
> <a href="explorer.php?folder=Family">Family</A> / <a
> href="explorer.php?folder=Family/Purciful">Purciful</A> / <a
> href="explorer.php?folder=Family/Purciful/Nathan">Nathan</A>
>
> anyone have any ideals or examples?
Not tested...
$F = explode( '/', $folder );
$Path = '';
while( list( , $Name ) = each( $F )) {
$Path .= "$Name/";
echo 'href="explorer.php?folder=' .
substr( $Path, 0, -1 ) .
'">' . $Name . '</A>\n';
}
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com