conditionals in a variable?
Posted: Tue Jun 17, 2003 12:44 am
Hi,
I am wanting to know if it is possible to put if/else conditionals in a variable?
Here is some example code
Thanks for any input
I am wanting to know if it is possible to put if/else conditionals in a variable?
Here is some example code
Code: Select all
$table =
'<table width=75% cellpadding=2 cellspacing=1 border=0>
<tr>
<td valign=top>'
.$mydomain = 'http://localhost/';
if(!eregi("$mydomain", $_SERVERї'HTTP_REFERER']))
{
echo '<img src=""images/image1.gif>';
}
else
{
echo '<img src=""../images/image1.gif>';
}.
'</td></tr></table>';