I've seen a few threads pop up in the support area of the php Section about
parcsing Variables In a Hyperlink, Alt, or Title. I am going to give you all a working code snippet which is used within my game I am Currently Making.

PHP Code:
$table "SELECT * FROM users";
$test mysql_query($table); 

echo 
"<table><tr><th>Username</th>";
echo 
"<th> </th>";
echo 
"<th>Created</th>";
echo 
"<th>Infastructure</th>";
echo 
"<th>Statename</th>";
echo 
"<th>Money</th></tr>";
while (
$row mysql_fetch_array($test)) { 
 echo 
'<tr><td><a href="profile.php?user='
    
$row['username'] . '">'
    
$row['username'] . '</a></td><td>
    <a href="sendmessage.php?user='
    
$row['username'] . '"><img src="images/messageicon.png" alt='
    
$row['username'] . '</img></a></td><td>'
    
    
$row['dayregistered'] . '</a></td><td>'
    
$row['infrastructure'] .  '</td><td> '
    
$row['statename'] .  '</td><td> $'
    
$row['money'] . '</td></tr>';
    
 }
echo 
"</table>"