PHP Table problem
Posted: Wed Dec 03, 2008 3:25 pm
i have created a simple table with two rows and three columns and three variables.
i want to echo my three variables in the columns of first row.
but when i echo these variables in the columns it generates an error
that the syntax of table is incorrect
error is
Parse error: syntax error, unexpected '<' in C:\wamp\www\table.php on line 19
here the all coding of my page
<html>
<head>
<?php /* Start of HEAD Section */ ?>
<title>PHP Page<?php echo $page ?></title>
<meta name = "description" content= "This is my first own PHP scripted page"
<?php /*End of HEAD Section*/ ?>
</head>
<?php /*Start of Body Section */ ?>
<body>
<?php echo "Here is a method to echo the variables in table" ?>
<?php //Start of Table ?>
<?php
$First = "Tassadduq";
$Last = "Hussain";
$RollNo = 623;
?>
<?php
echo "<table width='80%' border='1'>";
<tr>
<td>echo "$First";</td>
<td>echo "$Last";</td>
<td>echo "RollNo";</td>
</tr>
<tr>
<td>Sample Text</td>
<td>Sample Text</td>
<td>Sample Textt</td>
</tr>
</table>
?>
<?php //End of Table ?>
</body>
<?php /*End of Body Section */ ?>
where is the mistake in table.
i want to echo my three variables in the columns of first row.
but when i echo these variables in the columns it generates an error
that the syntax of table is incorrect
error is
Parse error: syntax error, unexpected '<' in C:\wamp\www\table.php on line 19
here the all coding of my page
<html>
<head>
<?php /* Start of HEAD Section */ ?>
<title>PHP Page<?php echo $page ?></title>
<meta name = "description" content= "This is my first own PHP scripted page"
<?php /*End of HEAD Section*/ ?>
</head>
<?php /*Start of Body Section */ ?>
<body>
<?php echo "Here is a method to echo the variables in table" ?>
<?php //Start of Table ?>
<?php
$First = "Tassadduq";
$Last = "Hussain";
$RollNo = 623;
?>
<?php
echo "<table width='80%' border='1'>";
<tr>
<td>echo "$First";</td>
<td>echo "$Last";</td>
<td>echo "RollNo";</td>
</tr>
<tr>
<td>Sample Text</td>
<td>Sample Text</td>
<td>Sample Textt</td>
</tr>
</table>
?>
<?php //End of Table ?>
</body>
<?php /*End of Body Section */ ?>
where is the mistake in table.