Having trouble with some code... see below:
File: template.php
File: page.phpPHP Code:<?php /* kicks ASP! */
$related = include('page.php');
foreach ($related as $rel_item){
include($rel_item.'.php');
}
?>
When I access template.php I recieve the following error:PHP Code:<?php /* kicks ASP! */
$related = array('mediareview','vectornews','latestnews');
return $related;
?>
Anybody know whats wrong?Warning: Invalid argument supplied for foreach() in /home/xvnt/public_html/php_template/template.php on line 4
Thanks for any help,
Phil
P.S. Running PHP 4.3.8 on Apache 1.3.31, if it makes a difference.




Reply With Quote