Forum Moderators: coopster
echo "</select>\ n";
echo "<table width="50%" border="2">
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
</tr>
</table>
?>
echo "<table width="50%" border="2">
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>
<td> </td>
with
echo "<table width=\"50%\" border=\"2\"> \n";
echo "<tr> \n";
echo "<td> </td> \n";
echo "<td><p> </p> \n";
echo "<p> </p></td> \n";
echo "<td> </td> \n";
You should have an echo statement on each line. This will make it easier to read your code. Remember to terminate your echo with a "; if you start it with a echo "
or
u can simply skip the double quots around attributes
another way to use html code to remove th hassle of ""
colse the php tag before html... e.g.
<?php
echo "php code"
//close php tag to start html
?>
<table width="500">
<tr>
<td>Html Row
</td>
</tr>
</table>
<?php
//start php tag again to write php code
echo "php code again";
...
?>
echo '<table width="50%" border="2">';
echo '<tr>\n';
echo '<td> </td>\n';
echo '<td><p> </p> \n';
And so forth... I am tired now, and that looks weird to me right now, heh... but anyways somethign liek that will work or you can just do
echo '
<table width="50%" border="2">
<tr>
<td> </td>
<td><p> </p>
<p> </p></td>';
either way will yield the same results, different people like to format their php differently...
Remember, though, if you are in single quotes, that it does not parse anything, so if you have a variable you need to do this
echo 'this text wont parse '.$parse.' and then so on';
gosh, it is time for sleep, hope this helped.