include help
| From: | jtjohnston | Date: | Sat, 15 Dec 2001 19:49:11 +0000 |
| Subject: | include help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-77831@lists.php.net to get a copy of this message | ||
I have a mess of variables I HTML from a couple of different
scripts, so I combined them into an include.inc.
But now, when I do this:
$news = mysql_query('select * from ccl where ... order by AU
asc');
while ($personne = mysql_fetch_object($news))
{
include "fields_to_include.inc";
}
of course my variables I now call in *.inc do not work. ...
So how do I make "$personne->AU" find it's original value using that
*.inc?
<? php
/*
content of fields_to_include.inc
global $personne->AU; #dedfinitely does not work
I have read the FAQ.
*/
if($personne->AU != ""){echo"<tr><td><b><<a
href=\"javascript:displayHelp('codes.htm#AU');\
">AU</a>></b></td><td>".$personne->AU."</td></tr>\n";}
if($personne->ST != ""){echo"<tr><td><b><<a
href=\"javascript:displayHelp('codes.htm#ST');\
">ST</a>></b></td><td>".$personne->ST."</td></tr>\n";}
if($personne->SD != ""){echo"<tr><td><b><<a
href=\"javascript:displayHelp('codes.htm#SD');\
">SD</a>></b></td><td>".$personne->SD."</td></tr>\n";}
if($personne->SC != ""){echo"<tr><td><b><<a
href=\"javascript:displayHelp('codes.htm#SC');\
">SC</a>></b></td><td>".$personne->SC."</td></tr>\n";}
?>