Forum Moderators: coopster
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo $row['Rows'] . " " .$row['field_rental_state_value']. " <br>";
}
Would help to see a bit more code, but I imagine you're trying to have the href in a link be dynamically populated with each id from a DB result set? In that case it would be -
while($row = mysql_fetch_assoc($result)){
echo "<a href=\"someScript.php?id=$row[id]\">$row[field_rental_state_value]</a> <br />";
}
Please verify this is what you need. Thanks
trying something like this. Trying to put what I have in the first and link it to site links like this www.website.com/state/[field_rental_state_value]
If you're going by this snippet of code you left
echo "<a href=\"someScript.php?id=$row[id]\">$row['Rows'] . " " .$row['field_rental_state_value']</a> <br />";
You'll need to jump out of your double quotes properly, and if you're not going to jump out of your double quotes, drop the single quotes around the array key, like one of these:
Jumping out to concatenate ...
echo "<a href=\"someScript.php?id=$row[id]\">" . $row['Rows'] . " " . $row['field_rental_state_value'] . "</a> <br />";
or this
Not jumping out ...
echo "<a href=\"someScript.php?id=$row[id]\">$row[Rows] $row[field_rental_state_value]</a> <br />";