superhoops Posted September 3, 2006 Share Posted September 3, 2006 I have a couple of variables and im trying to echo them into my table. Most of is html but i have added the php info where i want it.Here is the code:[code]<html><head><meta http-equiv="Content-Language" content="en-gb"><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Welcome to FMProtasy</title></head><body><table border="0" bgcolor="#FF8C00" width="100%" cellpadding="10"><tr><td width="100%" valign="top" style="border-style: solid; border-width: 2"><p align="left"><b><font face="Arial" size="2">Tottenham</font></b></td></tr></table><table border="0" bgcolor="#FF8C00" width="100%" cellpadding="10" height="15"><tr><td width="100%" valign="top" height="1" style="border-style: solid; border-width: 2"><p align="center"><img border="0" src="tot.gif" width="155" height="183" align="left"></p><table border="0" width="67%" id="table1"> <tr> <td width="163" align="center" bgcolor="#FFFFFF"> <font face="Arial" size="2">Team Name:</font></td> <td align="center" bgcolor="#FFFFFF"><font face="Arial" size="2">Tottenham</font></td> </tr> <tr> <td width="163" align="center" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">Manager:</font></td> <td align="center" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">Peter Jobes</font></td> </tr> <tr> <td width="163" align="center" bgcolor="#FFFFFF"> <font face="Arial" size="2">Squad:</font></td> <td align="center" bgcolor="#FFFFFF"><b><font face="Arial" size="2"> <a href="Sprs.txt"><span style="text-decoration: none"> <font color="#000000">Squad</font></span></a></font></b></td> </tr> <tr> <td width="163" align="center" height="20" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">Division:</font></td> <td align="center" height="20" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">Premiership</font></td> </tr> <tr> <td width="163" align="center" bgcolor="#FFFFFF"> <font face="Arial" size="2">Stadium Name:</font></td> <td align="center" bgcolor="#FFFFFF"><font face="Arial" size="2"> White Hart Lane Stadium</font></td> </tr> <tr> <td width="163" align="left" bgcolor="#000000"> <p align="center"><font face="Arial" size="2" color="#FFFFFF">Stadium Capacity:</font></td> <td align="center" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">20,000</font></td> </tr> <tr> <td width="163" align="left" bgcolor="#FFFFFF"> <p align="center"><font face="Arial" size="2">Home Fan Base:</font></td> <td align="center" bgcolor="#FFFFFF"><font face="Arial" size="2">13,000</font></td> </tr> <tr> <td width="163" align="left" bgcolor="#000000"> <p align="center"><font face="Arial" size="2" color="#FFFFFF">Away Fan Base:</font></td> <td align="center" bgcolor="#000000"> <font face="Arial" size="2" color="#FFFFFF">4,000</font></td> </tr>[color=red]<?phpinclude = code.php$val = 10 - $week; echo '<tr>'; echo '<td width="163" align="left" bgcolor="#FFFFFF"> <p align="center"><font face="Arial" size="2">Training Facilities:</font></td> <td align="center" bgcolor="#FFFFFF"><font face="Arial" size="2">Italio o Flabio - '.$val.' weeks left</font></td>'; echo '</tr>';?>[/color]</table></td></tr></table>[/code]The red font is the php part.This is the error message displayed:[b]Parse error: syntax error, unexpected '=' in /home/www/fmprotasy.com/Teams1/Prem/totmain.php on line 78[/b]Im sure ive made an obvious mistake as i am a no but any help would be much appreictaed. Quote Link to comment https://forums.phpfreaks.com/topic/19566-echo-problem/ Share on other sites More sharing options...
annihilate Posted September 3, 2006 Share Posted September 3, 2006 Look up how to use include statements. You don't use an equals sign on it.[code]include('code.php');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19566-echo-problem/#findComment-85107 Share on other sites More sharing options...
superhoops Posted September 3, 2006 Author Share Posted September 3, 2006 Thanks, hat is very starneg as a chatroom i have uses include = blah.php. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/19566-echo-problem/#findComment-85108 Share on other sites More sharing options...
wildteen88 Posted September 3, 2006 Share Posted September 3, 2006 This:[code=php:0]include = code.php[/code]is supposed to be this:[code=php:0]include 'code.php';[/code]You cannot use include with an equal sign. As it isn't the the correct syntax. The include synx is either of the following:[code=php:0]include("filename.php");include "filename.php";include 'filename.php';[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19566-echo-problem/#findComment-85110 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.