Hi All,
I'm a new boy to php and working on a web site with long sections of
code that could be done as includes apart from one or two things
changing.
I've tested the following and it works, but what I really want to know
is am I OK placing php code inside a html line like this, or could there
be problems?
<!-- html code for test.php -->
<!-- lot of code cut -->
<a href="<?php print $filename; ?>"><?php print $title; ?></a>
<!-- lot of code cut -->
<!-- end of test.php -->
<!-- which is called in the main file like this -->
<?php
$filename="inde x.php";
$title="Index Page";
include ("test.php") ;
?>
--
Ken Ward in Norwich ken@oldcity.f2s .com
For Norwich and East Anglia visit www.oldcity.org.uk
I'm a new boy to php and working on a web site with long sections of
code that could be done as includes apart from one or two things
changing.
I've tested the following and it works, but what I really want to know
is am I OK placing php code inside a html line like this, or could there
be problems?
<!-- html code for test.php -->
<!-- lot of code cut -->
<a href="<?php print $filename; ?>"><?php print $title; ?></a>
<!-- lot of code cut -->
<!-- end of test.php -->
<!-- which is called in the main file like this -->
<?php
$filename="inde x.php";
$title="Index Page";
include ("test.php") ;
?>
--
Ken Ward in Norwich ken@oldcity.f2s .com
For Norwich and East Anglia visit www.oldcity.org.uk
Comment