Question
Variable interplay between include files and parent files?
How can I define a variable in a parent file which is then
used in some
logic in an include file? For example, if I have -
<?php
$foo = 1;
?>
....
<?php require_once('foo.php'); ?>
and in foo.php, I have -
<?php if ($foo == 1) { echo "FOO"; } ?>
it doesn't seem to work. Am I testing improperly, or what?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
logic in an include file? For example, if I have -
<?php
$foo = 1;
?>
....
<?php require_once('foo.php'); ?>
and in foo.php, I have -
<?php if ($foo == 1) { echo "FOO"; } ?>
it doesn't seem to work. Am I testing improperly, or what?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
