desjardins2010 Posted January 18, 2011 Share Posted January 18, 2011 hey can I implant php to this echo "<tr align='center'><td><input type='text' size='16' value='I WANT TO ADD A VARIBLE HERE LIKE $note'></td><td><font color='#ffffff'>".$ip."</font></td><td><a href='deleteip.php?uid=".$userid."&ip=".$ip."'><img border='0' src='images/delete.png'></a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/224779-how-can-i-do-this/ Share on other sites More sharing options...
Garethp Posted January 18, 2011 Share Posted January 18, 2011 echo "<tr align='center'><td><input type='text' size='16' value='$note'></td><td><font color='#ffffff'>".$ip."</font></td><td><a href='deleteip.php?uid=".$userid."&ip=".$ip."'><img border='0' src='images/delete.png'></a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/224779-how-can-i-do-this/#findComment-1161093 Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 Since you're already echoing a double-quoted string, all you need to do is put the variable in there. Link to comment https://forums.phpfreaks.com/topic/224779-how-can-i-do-this/#findComment-1161094 Share on other sites More sharing options...
desjardins2010 Posted January 18, 2011 Author Share Posted January 18, 2011 really, hmm ok thanks guys I figured I had to end the "" but thanks Link to comment https://forums.phpfreaks.com/topic/224779-how-can-i-do-this/#findComment-1161095 Share on other sites More sharing options...
Garethp Posted January 18, 2011 Share Posted January 18, 2011 You only have to end it if you use single quotes instead of double quotes. In Double Quotes and Heredoc you can just use variables normally. However, for arrays, you need to put the array in {}'s, like this echo "Array Value: {$array[$x]}"; Link to comment https://forums.phpfreaks.com/topic/224779-how-can-i-do-this/#findComment-1161097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.