> According to the docu u should not require() files or 
> external code in loops
> or u must use curly Bracket when used in if conditions.
> 
> But everythink works fine. I require() successfully in for 
> loops, I can use
> it in if..elseif..else constucts without curly brackets. 
> (only one line of
> cause)
> 
> So where is the difference between require() and include().

It depends on how you are using it. If you want what you are require()'ing
to *vary* on each loop iteration, you must use include(). A require() is
only executed once, during the initial parse of the file. An include() gets
re-evaluated on each loop iteration, so you can vary the filename, etc. See
http://www.php.net/manual/en/function.require.php for more.

Kirk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to