echo("<a href='index.php?id=$id'>" . $fnam . " " . $lname);
That is my code for a link I'm trying to make. However, when you hover over it, this is what the bar says:
http://www.site.com/index.php?id= 1
How do I remove that space? Thanks! 🙂
Evidently, $id is equal to " 1." Get rid of the space in $id. You could also use trim(), ltrim(), rtrim(), etc.
Either the trim fucntion didn't work, or I didn't set it up right. How would I set that up so it works properly?
$id= ereg_replace(" ","",$id);