I started to write a really long detailed explanation about how php works and intertwines with HTML. But then I realized that I was making the question much more difficult than what it had to be. So yes, php code can be embeddedinto an HTML document, and here's a simple example. But as Tony said, you have to rename the document with a .php extension so that your web server knows to expect php code within the document. Otherwise, your code will appear as regular text.<br>
<br><br>------ snip ------<br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>"><br><HTML><br>
<HEAD><br> <TITLE><? echo "test page"; ?></TITLE><br><Body><br><br><p align=center><br>Post 10 URL links using PHP<br><?<br>// Something a lil more complex<br> $loop=1;<br>
<br> while ($loop <=10) {<br> echo " <a href=\"test-$loop.html\"> $loop </a>";<br><br> if ($loop < 10) { echo " | \n"; }<br> $loop++;<br> }<br>?><br></p><br><br>
</Body><br></HTML><br>
------ snip ------<br><br><br>Hope this helps<br><br>-Rob<br><br><div class="gmail_quote">On Thu, Nov 20, 2008 at 12:17 AM, Robert Wolfe <span dir="ltr"><<a href="mailto:nflug@muzzlethem.com">nflug@muzzlethem.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all!<br>
<br>
I was wondering, can a PHP script be embedded anywhere inside an HTML file<br>
and if so, how?<br>
_______________________________________________<br>
nflug mailing list<br>
<a href="mailto:nflug@nflug.org">nflug@nflug.org</a><br>
<a href="http://www.nflug.org/mailman/listinfo/nflug" target="_blank">http://www.nflug.org/mailman/listinfo/nflug</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>-Rob<br><br>Ben Franklin Quote: "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."<br>