-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Whilst lounging around on Mon, 30 Jun 2003 10:42:42 +0100, Kevin
Thorpe <ke***@pricetrak.com> amazingly managed to produce the
following with their Etch-A-Sketch:
James wrote: What is the best method for creating a Web Page that uses both
PHP and HTML ?
If you are a programmer then you are probably happier staying
inside the php tags and using print/echo to generate your HTML.
I work differently. I write the bulk of my code at the top of the
document then drop out of the php tags to output the html with as
little php in there as possible. This lets me hand a rough but
functional document to my colleague who styles and polishes it in
DreamWeaver. If you take this a step further you can include the
html to allow
alternative languages / representations.
<?php include('library.inc');
loadobject($_REQUEST['id']);
?>
<html>
<body>
<?=object['id']?>
^^^^^^^^^^^^^^^^^
</body>
</html>
And if the server is configured for XML (ie: short tags disabled)
this would fall over.
The biggest thing to strike me here for this example, was that you
use '<?php' for the initial instance, yet '<?' for the second.
One of the biggest parts of coding, is style and consistency =)
Regards,
Ian
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0
iQA/AwUBPwAPTmfqtj251CDhEQIE+QCglmHcOaBbjDscnB2gULebsd 4WfKcAoOWb
nW4s8jv0O0sEQzefYhiVYfpp
=hglr
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.