Jump to content

Echo Problem


superhoops

Recommended Posts

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]<?php
include = 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.
Link to comment
https://forums.phpfreaks.com/topic/19566-echo-problem/
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/19566-echo-problem/#findComment-85110
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.