View Single Post
01-10-2007, 06:07 PM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  163-My Row Title.html to 163-my-row-title.html

PHP Code:
                     <?php

                        $rowcolor 
1;

                        
$sql "select wallpaperid, title from wallpaper where status = 'L' order by downloads desc limit 0,10";

                        
$result mysql_query($sql ,$db);

                        if (
$myrow mysql_fetch_array($result)) {

                           do {

                              if (
$rowcolor == 1) {
                                 
$rowcolorhex "light";
                                 
$rowcolor 0;
                              } else {
                                 
$rowcolorhex "dark";
                                 
$rowcolor 1;
                              }

                              
printf("<li class=%s><a href=http://domain.com/%s-%s.html>%s</a> "$rowcolorhex$myrow["wallpaperid"], $myrow["title"], $myrow["title"]);

                           } while (
$myrow mysql_fetch_array($result));

                        }
                     
?>
This outputs:
Code:
<li><a href="http://domain.com/163-My Row Title.html">My Row Title
The problem is, I need it outputted like:
Code:
<li><a href="http://domain.com/163-my-row-title.html">My Row Title
163-My Row Title.html to 163-my-row-title.html

Don't suppose someone could help me out?