php3-list | 199908
Date: 08/21/99
- Next message: Jason Brooke: "Re: [PHP3] writing into a text file"
- Previous message: Timothy Bates: "[PHP3] Re: PHP on the Mac + Executing Perl Scripts from PHP"
- Next in thread: John Coggeshall: "RE: [PHP3] 2 variables deep"
- Reply: John Coggeshall: "RE: [PHP3] 2 variables deep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I'm still new at PHP and am stuck on something simple.
I want to create an Array of the QUERY_STRING variables from the previous
page and then call them up. It seems like it should be simple but I can't
get it working.
I tried something like
$categories = array("ID", "cat1", "cat2");
for ($i=0; $i < count($categories) ; $i++ ) {
if ($i<>0) {
$fields .= ", ";
$values .= ", ";
}
$cat = $category[$i] ;
print $cat;
}
or . . .
eval("\$cat = \"$category[$i]\";");
print $cat;
}
But, I don't get the variable of $ID, $cat1, $cat2, etc. I get the actual
string '$ID', '$cat1' etc.
In other words, I want the result to say "Sports" and not "cat1".
Must be something simple that I am missing.
Thanks very much in advance, I appreciated everyone's response to my last
question.
Scott
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jason Brooke: "Re: [PHP3] writing into a text file"
- Previous message: Timothy Bates: "[PHP3] Re: PHP on the Mac + Executing Perl Scripts from PHP"
- Next in thread: John Coggeshall: "RE: [PHP3] 2 variables deep"
- Reply: John Coggeshall: "RE: [PHP3] 2 variables deep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

