PHP within PHP
Posted: Wed Aug 06, 2003 4:02 pm
I have a slight problem...:
function.php:
news.php
home.php
Outputs code without re-formatting the PHP code. How do I fix this?
Fot the website
function.php:
Code: Select all
<?php
function blah($thing) { print "<a href="http://www.$thing.com">$thing</a>"; }
?>Code: Select all
<?php include_once("function.php"); ?>
<p>go to <?php blah("zombo"); ?></p>Code: Select all
<?php include_once("function.php");
$display = include 'news_archives.htm';
$display = explode('</p>', $display);
for ($i=0;$i<count($display) && $i<4;$i++) print "$displayї$i]</p>";
?>Fot the website