Re: Eval()??? A variables contents?

From: Date: Fri, 09 Nov 2001 20:01:18 +0000
Subject: Re: Eval()??? A variables contents?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74048@lists.php.net to get a copy of this message
On Friday 09 November 2001 11:51 am, Christopher Raymond wrote: > Let's say I have: > > $content = "<?PHP Query_Database( $category );?>"; > > > If I use <?PHP echo $content; ?>, it doesn't evaluate that content. What am > I doing wrong here? 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

« previous php.general (#74048) next »