RE: [PHP] Eval()??? A variables contents?

From: Date: Fri, 09 Nov 2001 20:23:52 +0000
Subject: RE: [PHP] Eval()??? A variables contents?
Groups: php.general 
Request: Send a blank email to php-general+get-74053@lists.php.net to get a copy of this message
http://www.php.net/manual/en/function.eval.php Kirk > -----Original Message----- > From: Christopher Raymond [mailto:christopher@oasisnetworks.com] > Sent: Friday, November 09, 2001 1:11 PM > To: PHP List > Subject: Re: [PHP] Eval()??? A variables contents? > > > on 11/9/01 2:01 PM, Kurt Lieber at php@kirpatrick.com wrote: > > > What you're doing doesn't make any sense. If it were to > work, it would look > > like the following: > > > > <?PHP <?PHP Query_Database( $category );?> ; ?>, > > > > or something similar. I think what you want to do is: > > <?php > > $content = query_database($category); > > echo $content; > > ?> > > > > that's using psuedo-code, of course. You'll want to > substitute correct php > > syntax for returning database results. > > > > > Kurt: > > I understand where you are coming from, and I appreciate your answer. > However, I'm trying to get PHP to parse commands that are stored in a > variable because I'm passing those commands to a function. Inside the > function, it needs to evaluate the commands stored in the variable. > > Does you solution solve that or does my description clarify my problem > better?

« previous php.general (#74053) next »