Re: MORE INFO > Eval()??? A variables contents?

From: Date: Fri, 09 Nov 2001 20:43:24 +0000
Subject: Re: MORE INFO > Eval()??? A variables contents?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74056@lists.php.net to get a copy of this message
OK, maybe I'm missing something, but why not just replace: > <?PHP echo $content;?><br> with: <?PHP echo eval($content);?><br> Assuming your Query_Database() function returns a string, this should work fine. Christopher Raymond wrote: > > Okay there are two files involved here. First is my index.php file: > > $params = array('class' => 'text10', 'content' => > 'Query_Database( $category > )'); > > switch ( $mode ) { > > case "list": > > Make_TR( $params ); // This is executing the included function. > break; > > default: > Display_Default(); > > } > > Then there's the function that's located elsewhere in an include file: > > <?PHP > > function Make_TR ( $params ) { > > ( $params["class"] ) ? $class = "class=" . $params["class"] : > $class = ""; > ( $params["content"] ) ? $content = $params["content"] : $content = > ""; > > ?> > > <tr> > <td width="535" <?PHP echo $class;?>> > <div align="left"> > <br> > <?PHP echo $content;?><br> > <br> > </div> > </td> > </tr> > > <?PHP > > } > > ?> > > Christopher <-- Still has no solution :-( > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Chris Hobbs Silver Valley Unified School District Head geek: Technology Services Coordinator webmaster: http://www.silvervalley.k12.ca.us/~chobbs/ postmaster: chobbs@silvervalley.k12.ca.us

« previous php.general (#74056) next »