This is probably simple enough to do, but I cant get it!
I have a mysql table 'links' with these fields;
id int 10 primary ai
link varchar 200
description varchar 200
I have a links page to populate with this info. I want the desciption as the visible text.
This is my code which doesnt work!
<?php
include 'connect.php';
$data = mysql_query("SELECT * FROM links ORDER BY id DESC")
or die(mysql_error());
while($info = mysql_fetch_array( $data )) {
echo '<a href="$info['link']">$info['description']</a>';//this line is the problem
echo '<br />';
}
?>
Can anyone see where im going wrong?
Thanks....