phpfisher Posted November 29, 2006 Share Posted November 29, 2006 ive been programmed a php script for a long time, and im stuck, its for movie clips[code]while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $playphp = "<a href=".""play.php?"".$row['id'].">"; echo $playphp; echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['creator']; echo "</td><td>"; echo $row['date']; echo "</td></tr>"; echo "</a>";} [/code]bascially i want to link each row of the table to play.php?{its id}but it messes up when i use double quotes[code]""play.php?""[/code] can anyone help Link to comment https://forums.phpfreaks.com/topic/28806-help/ Share on other sites More sharing options...
bqallover Posted November 29, 2006 Share Posted November 29, 2006 Looks like you've not escaped your quotes. This should work.[code]$playphp = "<a href=\"play.php?$row[id]\">";[/code] Link to comment https://forums.phpfreaks.com/topic/28806-help/#findComment-131882 Share on other sites More sharing options...
sw0o0sh Posted November 29, 2006 Share Posted November 29, 2006 You can do what the guy above said, or try using ' instead.while($row = mysql_fetch_array($result)){ $playphp = "<a href='play.php?$row[id]'>";/* other methods*/// $playphp = "<a href='play.php?".$row[id]."'>";// $playphp = "<a href=\"play.php?".$row['id']."\">"; // Most servers dont require ". . " etc; echo $playphp; echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['creator']; echo "</td><td>"; echo $row['date']; echo "</td></tr>"; echo "</a>";} Link to comment https://forums.phpfreaks.com/topic/28806-help/#findComment-131889 Share on other sites More sharing options...
phpfisher Posted November 29, 2006 Author Share Posted November 29, 2006 Thanks this really helped Link to comment https://forums.phpfreaks.com/topic/28806-help/#findComment-132034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.