Re: Error message trying to include a file
| From: | Curt Zirzow | Date: | Mon, 01 Dec 2003 22:17:11 +0000 |
| Subject: | Re: Error message trying to include a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171506@lists.php.net to get a copy of this message | ||
* Thus wrote Matthias Wulkow (elektrik@gmx.net):
>
> I have an array filled with urls of javascript files and then I
> include them one by one in a loop.
>
> for( $i = 0 ; $i < sizeof($this->page->javascript) ; $i++ ){
>
> include($this->page->javascript[$i]);
> //This line above is line 52 shown on error warning
> }
what does print_r($this->page->javascript) yield?
you'd be better off with a loop like:
foreach($this->page->javascript as $file_to_include) {
include($file_to_include);
}
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP