View Full Version : Table inside a Echo without errors..
Colin-Roberts
20-11-2008, 09:56 PM
I'm trying to code a table inside one echo.
It says unexpected t string on the first line..
It's not a matter of alot of adding alot of / is it.
echo "<font face="verdana"><table class="style9" border="0" width="356">
<tbody>
<tr><td class="style7" align="middle" bgcolor="#bce0ee" width="76" height="14"><div class="style2" align="center"><strong><font size="1">Day:</font></strong></div></td>
<td class="style9" align="middle" bgcolor="#bce0ee" width="118" height="14"><div class="style2" align="center"><strong><font size="1">Event:</font></strong></div></td>
<td class="style9" align="middle" bgcolor="#bce0ee" width="148" height="14"><div class="style2" align="center"><strong>Info:</strong></div></td>
</tr></tbody></table>
<table class="style9" border="0" width="356">
<tbody>
<tr><td class="style7" align="middle" bgcolor="#bce0ee" width="76" height="14"><div align="center">$day</div></td>
<td class="style9" align="middle" bgcolor="#bce0ee" width="118" height="14"><div align="center"><font size="1"><font face="verdana"><span class=\"event_name\">$event</span></font></font></div></td>
<td class="style9" align="middle" bgcolor="#bce0ee" width="148" height="14"><div align="center"><font size="1"><font face="verdana">$description</font></font></div></td>
</tr></tbody></table>";
Excellent2
20-11-2008, 09:58 PM
Use ' or \"
wsg14
20-11-2008, 10:00 PM
echo "<font face=\"verdana\"><table class=\"style9\" border=\"0\" width=\"356\">
<tbody>
<tr><td class=\"style7\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"76\" height=\"14\"><div class=\"style2\" align=\"center\"><strong><font size=\"1\">Day:</font></strong></div></td>
<td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"118\" height=\"14\"><div class=\"style2\" align=\"center\"><strong><font size=\"\1">Event:</font></strong></div></td>
<td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"148\" height=\"14\"><div class=\"style2\" align=\"center\"><strong>Info:</strong></div></td>
</tr></tbody></table>
<table class=\"style9\" border=\"0\" width=\"356\">
<tbody>
<tr><td class=\"style7\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"76\" height=\"14\"><div align=\"center\">$day</div></td>
<td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"118\" height=\"14\"><div align=\"center\"><font size=\"1\"><font face=\"verdana\"><span class=\"event_name\">$event</span></font></font></div></td>
<td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"148\" height=\"14\"><div align=\"center\"><font size=\"1\"><font face=\"verdana\">$description</font></font></div></td>
</tr></tbody></table>";
I missed one but I can't seem to edit it in. :S But I think you get the idea.
Calon
20-11-2008, 10:01 PM
It really is a matter of using /"
Simply just use ' instead of " on the echo to save you the hastle of adding a load of slashes.
Jackboy
20-11-2008, 10:18 PM
Collin i thought u were gd at php lol
Colin-Roberts
20-11-2008, 10:22 PM
I'm alright at it. it's the stupid mistakes that get me.
got it fixed..
I don't even code PHP and I realised the issue instantly :S You obviously can't be that great of a coder.
Jackboy
21-11-2008, 04:46 PM
I don't even code PHP and I realised the issue instantly :S You obviously can't be that great of a coder.
Naa, Collin has a good point. When you are at a certain level you miss out obvious mistakes such as ; and closing the " etc.
I used to do it :)
Also Greg why don't you learn PHP somewhen? You have ONE of the best coders on the forum working with you so..?
Naa, Collin has a good point. When you are at a certain level you miss out obvious mistakes such as ; and closing the " etc.
I used to do it :)
Also Greg why don't you learn PHP somewhen? You have ONE of the best coders on the forum working with you so..?
All the more reason not to learn it when other people can :P
Jackboy
21-11-2008, 06:06 PM
All the more reason not to learn it when other people can :P
Fair dos.
But it could help you in the future. Somebody could be like
"Tell me how i would display text"
"ECHO "TEXT";" ZOmG
Excellent2
21-11-2008, 06:12 PM
"ECHO "TEXT";" ZOmGAny web designer/developer who doesn't know how to print text via PHP needs his/her head crushing with a nut crusher.
Jackboy
21-11-2008, 06:18 PM
Any web designer/developer who doesn't know how to print text via PHP needs his/her head crushing with a nut crusher.
Ahh u lie !
Designers don't need to know PHP or how to code layouts :P
They just need to know photoshop
Naa, Collin has a good point. When you are at a certain level you miss out obvious mistakes such as ; and closing the " etc.
I used to do it :)
Also Greg why don't you learn PHP somewhen? You have ONE of the best coders on the forum working with you so..?
Lol it's not really an obvious mistake though. It's like a fundamental of printing text :P
Excellent2
21-11-2008, 06:48 PM
Ahh u lie !
Designers don't need to know PHP or how to code layouts :P
They just need to know photoshopNo but they should know basic PHP as sometimes they may need it?
HotelUser
22-11-2008, 02:27 AM
Ahh u lie !
Designers don't need to know PHP or how to code layouts :P
They just need to know photoshop
Poor designers. Good designers will be able to code their layout nicely, and implement things like javascript navigation or image viewers. The design doesn't stop at Photoshop.
No but they should know basic PHP as sometimes they may need it?
For someone making a layout PHP isn't a requirement. If you're using PHP within your website for including pages or a usersystem then yeah, you should have at least a basic knowledge of PHP.
If that's so HotelUser then why have I been able to get myself a job as Lead Designer? :S
I only code HTML and CSS, I don't even go near Javascript or PHP.
HotelUser
25-11-2008, 08:22 PM
If that's so HotelUser then why have I been able to get myself a job as Lead Designer? :S
I only code HTML and CSS, I don't even go near Javascript or PHP.
Because in this case there's people qualified to code the PHP or Javascript.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.