Re: [PHP] help with eval problems...

2002-07-06 Thread Paul Roberts

On Fri, 5 Jul 2002, Kelly Meeks wrote:
> If I had this information stored in a database field, 
> ">
> 
> how could I assign it to a variable and output it?

  
you have to ?> first to leave php mode so you can do 

$content_output = "logo.gig";
$code = "";
eval("?>$code"); 

 which will echo the outut

or catch it with output buffering

$content_output = "logo.gig";
$code = "";
 ob_start(); 
eval("?>$code"); 
$evaled_code = ob_get_contents(); 
ob_end_clean(); 

I have used arrays in evals before you have to watch the quotes.

Paul Roberts
[EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] help with eval problems...

2002-07-05 Thread Miguel Cruz

On Fri, 5 Jul 2002, Kelly Meeks wrote:
> If I had this information stored in a database field, 
> ">
> 
> how could I assign it to a variable and output it?

I'm not sure that you can eval() HTML.

Perhaps if your cell contained:

   echo ""

you would have better luck. Don't quote me on it though.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] help with eval problems...

2002-07-05 Thread Kelly Meeks

If I had this information stored in a database field, 
">

how could I assign it to a variable and output it?

I've gone thru the info on eval() @ php.net, but it's not getting thru my skull very 
well.  I keep getting errors I can't correct.

Can anyone give me some pointers?

Any good tutorials on eval for php out there?

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php