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>"; Quote Link to comment 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>"; Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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]}"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.