RE: [PHP] Include question

From: Date: Wed, 12 Jun 2002 02:34:56 +0000
Subject: RE: [PHP] Include question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-101665@lists.php.net to get a copy of this message
> somefile.php > <? > $apple = 'green'; > $pear = 'yellow'; > ?> > > callfile.php > <? > include 'somefile.php'; > echo "Apples are $apple and Pears are $pear"; \\ which would > return the > line with green and yellow in the correct spots. > ?> > > But when I just do > > <? > include 'somefile.php'; > ?> > > It prints: > $apple = 'green'; $pear = 'yellow': Looks to me like your include file isn't being interpreted as php for some reason. Is the information here your exact test case or is it different. Certainly, as you've got it here, it would work - at least it does for the numerous php projects I've done. CYA, Dave -- ---------------------------------------------------------------------- Outback Queensland Internet ************************ Longreach ** New Web Site Online * Queensland ************************ Australia W: www.outbackqld.net.au

« previous php.general (#101665) next »