Jump to content

[SOLVED] str_replace and ucwords


kyleldi

Recommended Posts

do {
echo '<div class="thumbframe">
<div class="thumb"><a href="downloads.php?category='.str_replace(" ","+",$row_rs_multi_cats['category']).'"><img src="images/downloads/'.str_replace(" ","+",$row_rs_multi_cats['category']).'.jpg" alt="'.str_replace("+"," ",$row_rs_multi_cats['category']).'" width="100" height="58" border="0" longdesc="downloads.php?category='.str_replace(" ","+",$row_rs_multi_cats['category']).'" /></a></div> 
<div>'str_replace("+"," ",ucwords($row_rs_multi_cats['category']))'</div></div>'; /// This is where it dies ///
   } 
   while ($row_rs_multi_cats = mysql_fetch_assoc($rs_multi_cats)); 
}
else{

Don't forget . to concatenate strings

echo '<div class="thumbframe">
<div class="thumb"><a href="downloads.php?category='.str_replace(" ","+",$row_rs_multi_cats['category']).'"><img src="images/downloads/'.str_replace(" ","+",$row_rs_multi_cats['category']).'.jpg" alt="'.str_replace("+"," ",$row_rs_multi_cats['category']).'" width="100" height="58" border="0" longdesc="downloads.php?category='.str_replace(" ","+",$row_rs_multi_cats['category']).'" /></a></div> 
<div>'.str_replace("+"," ",ucwords($row_rs_multi_cats['category'])).'</div></div>'; /// This is where it dies ///

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.