Nibinaear
January 21st, 2005, 03:12 PM
I've been using an echo statement to write my html code to the webpage, so to use double quotes in the html code, I have to escape them using \".
This is cumbersome and I need to find a better way. I'm thinking of using addSlashes(), but do I have to apply that to the whole of my script?
At the moment there is a problem with using this method, but I don't know what it is, the code just doesn't display correctly. What I really need is a way to get html documents, and change them to php really quickly and easily, is there a program that's good at doing that?
Here is my code:
<?
include ('header.php');
echo "
<!--Modules row-->
<tr>
<td width =\"200\" rowspan = \"5\" align = \"center\" valign = \"top\"><img src = \"corkboard.jpg\"/></td>
<td width =\"50%\" rowspan = \"5\">
<table border = \"1\" cellpadding = \"0\" cellspacing = \"0\" valign = \"top\" width = \"100%\" height = \"100%\">
<tr>
<td valign = \"top\" width = \"100%\" height = \"100%\">
Welcome to testing times.
<P> <P> <P> <P> <P> <P> <P> <P> <P> <P> <P>
</td>
</tr>
</table>
</td>
<td> </td>
<td class = \"twohundred\" colspan = \"3\" align = \"right\">
<img src= \"tornpaper.jpg\"/>
</td>
</tr>
<tr>
<td> </td>
<td class = \"twohundred\" colspan = \"3\" name = \"modules box\">
<table width = \"100%\" background = \"bg01.jpg\" height = \"100%\" border = \"1\" cellpadding = \"0\" cellspacing = \"0\">
<tr>
<td>
<ul type = \"square\">
<li/>CG115: E-Business & Web Management
<li/>CG551: Professional Development
<li/>CM512: Object Orientation
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr height = \"30\">
<td colspan = \"4\" name = \"right hand side\"> </td>
</tr>
<!--tasks-->
<tr>
<td> </td>
<td class = \"twohundred\" width = \"200\" colspan = \"3\" name = \"right hand side\" align = \"right\">
<img src= \"tornpaper-tasks.jpg\"/>
</td>
</tr>
<tr>
<td> </td>
<td class = \"twohundred\" name = \"right hand side\" colspan = \"3\">
<table width = \"100%\" height = \"100%\" background = \"bg01.jpg\" border = \"1\" cellpadding = \"0\" cellspacing = \"0\">
<tr>
<td class = \"twohundred\">
<ul type = \"square\">
<li/>Add Assignment
<li/>Edit Assignment
<li/>Edit my details
<li/>Change my details
</ul>
</td>
</tr>
</table>
<P> <P> <P>
</td>
</tr>
</table>
</body>
</html>
";
?>
This is cumbersome and I need to find a better way. I'm thinking of using addSlashes(), but do I have to apply that to the whole of my script?
At the moment there is a problem with using this method, but I don't know what it is, the code just doesn't display correctly. What I really need is a way to get html documents, and change them to php really quickly and easily, is there a program that's good at doing that?
Here is my code:
<?
include ('header.php');
echo "
<!--Modules row-->
<tr>
<td width =\"200\" rowspan = \"5\" align = \"center\" valign = \"top\"><img src = \"corkboard.jpg\"/></td>
<td width =\"50%\" rowspan = \"5\">
<table border = \"1\" cellpadding = \"0\" cellspacing = \"0\" valign = \"top\" width = \"100%\" height = \"100%\">
<tr>
<td valign = \"top\" width = \"100%\" height = \"100%\">
Welcome to testing times.
<P> <P> <P> <P> <P> <P> <P> <P> <P> <P> <P>
</td>
</tr>
</table>
</td>
<td> </td>
<td class = \"twohundred\" colspan = \"3\" align = \"right\">
<img src= \"tornpaper.jpg\"/>
</td>
</tr>
<tr>
<td> </td>
<td class = \"twohundred\" colspan = \"3\" name = \"modules box\">
<table width = \"100%\" background = \"bg01.jpg\" height = \"100%\" border = \"1\" cellpadding = \"0\" cellspacing = \"0\">
<tr>
<td>
<ul type = \"square\">
<li/>CG115: E-Business & Web Management
<li/>CG551: Professional Development
<li/>CM512: Object Orientation
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr height = \"30\">
<td colspan = \"4\" name = \"right hand side\"> </td>
</tr>
<!--tasks-->
<tr>
<td> </td>
<td class = \"twohundred\" width = \"200\" colspan = \"3\" name = \"right hand side\" align = \"right\">
<img src= \"tornpaper-tasks.jpg\"/>
</td>
</tr>
<tr>
<td> </td>
<td class = \"twohundred\" name = \"right hand side\" colspan = \"3\">
<table width = \"100%\" height = \"100%\" background = \"bg01.jpg\" border = \"1\" cellpadding = \"0\" cellspacing = \"0\">
<tr>
<td class = \"twohundred\">
<ul type = \"square\">
<li/>Add Assignment
<li/>Edit Assignment
<li/>Edit my details
<li/>Change my details
</ul>
</td>
</tr>
</table>
<P> <P> <P>
</td>
</tr>
</table>
</body>
</html>
";
?>