[thelist] PHP include

Kevin Timmins kipper_timmins at live.co.uk
Fri Aug 6 12:56:06 CDT 2010


erm,
whats the scenario here? I am trying to imagine a situation where you would 
have to do something like that. can you not just have it all in one file?
try putting the php tags in the otherfile.php

<?php
if(something){
do some stuff
}
?>

but other than that i just dont understand why you would want to do what you 
are doing.

>
> Hi There,
>
> I have got a quick and stupid question :)
>
> Here it is the scenario:
>
> I have a file called file.php
> I have another file called otherfile.php
>
> Content of otherfile.php:
>
> if (something) {
> do some stuff
> }
>
> Content of file.php:
>
> <?php
> include(otherfile.php);
> else if (other thing) {
> do other things
> }
> ?>
>
> Shouldn't the above senario work? but I do get a parse error for the ELSE 
> if.
>
> Thanks for your input
>
> davoud
>
>
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
> 


More information about the thelist mailing list