Page 1 of 1

how to insert php into html that is already inside php

Posted: Wed May 24, 2006 8:53 am
by Folcon
i think its a problem with my escaping of characters. the main problem is i havn't seen any tutorials on this so here is the code
(this is probably a very newbie problem but i hope someone can point me in the right direction)

Code: Select all

function menu()
{
echo("<div id=\"Oobj12\" style=\"position:absolute\;z-index:4\;visibility:visible\; left:1px\;top:173px\;width:165px\;height:299px\;\"> ");
echo("<div id=\"Grtf9\" class=\"dfltt\">);
include("menu.php");
echo("<br></div>");
echo("</div>");

?>
im trying to create a funtion that produces a menu in that position as my site is modular the include is to summon my menu, menu.php

Posted: Wed May 24, 2006 9:06 am
by JayBird
You mean like this?

Code: Select all

<?php
function menu()
{
	echo '<div id="Oobj12" style="position:absolute;z-index:4;visibility:visible; left:1px;top:173px;width:165px;height:299px;">';
	echo '<div id="Grtf9" class="dfltt">';
	include("menu.php");
	echo '<br></div>';
	echo '</div>';
}
?>

Posted: Wed May 24, 2006 9:12 am
by Folcon
umm yes thank you very much :D