Forum Moderators: coopster
$foo=$row_table['col_name'];
if ($foo == 'blue')
{
echo '<script type=\"text/javascript\">
<!--
//-->
</script>';
}
else
echo '<script type=\"text/javascript\">
<!--
//-->
</script>';
?>
What's the best way to do this with a boatload of advanced API code that needs the database?
I want to serve one block of js based upon a database value, else serve a different block of javascript:
I think the empty blocks are just being shown for example, mojomike.
BTW, PHP calls this Advanced escaping [php.net].