LimitedStreak Posted August 21, 2011 Share Posted August 21, 2011 (edited) Post deleted Edited January 12, 2012 by LimitedStreak Quote Link to comment Share on other sites More sharing options...
Jaaaacccckkk Posted August 21, 2011 Share Posted August 21, 2011 Replace " with ' or remove them completely. Then try it; <?php echo"<table width='480' border='0' etc etc"; Quote Link to comment Share on other sites More sharing options...
Nickson Posted August 21, 2011 Share Posted August 21, 2011 why does everyone always change all double quotes to single quotes within an echo? You can use single quotes with an echo as well .. Quote Link to comment Share on other sites More sharing options...
Anonymous Posted August 21, 2011 Share Posted August 21, 2011 echo <<<EOT No idea; I like using "heredoc" and 'nowdoc' myself. EOT; Quote Link to comment Share on other sites More sharing options...
Nickson Posted August 22, 2011 Share Posted August 22, 2011 Why risk an error when you can flick between the 2 and guarantee none? I do mine out of habit - done it that way along time now and not willing to change :D I understand that, however looking at the OP, he listed some html with double quotes... Yet if you look at some replies, Jaaaacccckkk and CarvellA change all double quotes to single quotes. That is something that I do not understand. Quote Link to comment Share on other sites More sharing options...
Jaaaacccckkk Posted August 22, 2011 Share Posted August 22, 2011 why does everyone always change all double quotes to single quotes within an echo? You can use single quotes with an echo as well .. Wheres the harm in not using them? I'd rather be using single quotes than backslashing my double quotes. Quote Link to comment Share on other sites More sharing options...
Nickson Posted August 22, 2011 Share Posted August 22, 2011 And how about something like this? echo '<table class="tables" id="something">...</table>'; what you suggest echo "<table class='tables' id='something'>...</table>"; Suddenly all quotes changed, maybe the OP has a reason why he's using double quotes within his html? I don't see why you need to change those inner double quotes to inner single quotes so you can user outer double quotes, when you can just use outer single quotes.. I mean, with that logic in mind you'd change 500lines of html because you want to use double quotes to start your echo... I really don't understand that.. Quote Link to comment Share on other sites More sharing options...
Jaaaacccckkk Posted August 22, 2011 Share Posted August 22, 2011 Because i know what script he's using, and it doesn't use single quotes around his echo echo' ';, it uses doubles echo" "; Hence why i did it, and he wouldn't need to change 500lines of html for that reason. Quote Link to comment Share on other sites More sharing options...
ShadyCoco Posted August 23, 2011 Share Posted August 23, 2011 <table width="480" border="1" align="center" class="thinline"> <tr bordercolor="#000000" bgcolor="#000000"> <td height="30" colspan="4"background="grad.png" class="style9"><div align="center" class="style8">Info</div></td> </tr><td class="style9"></td> <tr bgcolor="#000000" align="center"> <td width="100%" height="20" class="style1 style3 style3 style6"><div align="center" class="style10"> Welcome to Godfather Haven. You can enter right now by <a href="register.php">registering</a>. If you are a returning member of Godfather Haven then please login using the form below:</a></div></td> </tr> </table> when writing this into an echo or any tr class it shows up as a white screen, any help? Thanks Ermm Don't echo it? end the php put the code there like so <?php //your code here //heres where you want the HTML //end the PHP ?> <!-- add HTML here --> <!-- start php again --> <?php //carry on with your code... // then end or leave open ?> Hope this help you... 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.