I have a script that I am working on that pulls info from a database:

<-- Code -->
$getscname = mysql_query("SELECT * FROM subcat WHERE subcatid =
'$subcatid'") or die ("Couldn't get the info.<br>".mysql_error());
        while($sub_cat = mysql_fetch_array($getscname)){
                $subcat_id = $sub_cat['subcatid'];
                $subcat_name = $sub_cat['subcatname'];
                echo '<a
<-- Code -->

At the end of each link, a pipe is printed. I want to take the pipe off
of the last result, so that the page will prit out:

SubCat1  |  SubCat2  |  SubCat3

I've tried using strlen & substr to do this, but it cuts the pipe off of
all the results, not the last one. Any suggestions?



PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to