On Fri, 5 Jul 2002, Kelly Meeks wrote: > If I had this information stored in a database field, > <img src="<? echo $content_output["site_logo"]; ?>"> > > 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 = "<img src='<?php echo $content_output; ?>'>"; eval("?>$code"); which will echo the outut or catch it with output buffering $content_output = "logo.gig"; $code = "<img src='<?php echo $content_output; ?>'>"; 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