replace and covert to friendly url???
Posted: Wed Jan 11, 2012 1:39 pm
Hello,
I ran into an issue while trying to validate my website. I am converting the title of a food into the url for seo reasons. The issue I have is that if the title has a symbol, for example, the & sign it does not validate obviously. How can I convert the title into friendly links? The link is stored in a variable and somehow needs stripped and replaced. Here is how I am calling it...
This stores the link or title:
Next this displays it on the page to be clicked:
So I am assuming somewhere in-between these two codes and need to perform some sort of strip but I don't know how to do that. Any help would be greatful! Thanks!! 
I ran into an issue while trying to validate my website. I am converting the title of a food into the url for seo reasons. The issue I have is that if the title has a symbol, for example, the & sign it does not validate obviously. How can I convert the title into friendly links? The link is stored in a variable and somehow needs stripped and replaced. Here is how I am calling it...
This stores the link or title:
Code: Select all
$thisName = MYSQL_RESULT($result,$i,"name");Code: Select all
<a href="fooddetail.php?id=<?php echo $thisId; ?>"><?php echo $thisName; ?></a>