I'm using MagicFields for WordPress and I'm checking a variable to see if it's true.
A working example is...
<?php
if ( get('daytime_number',TRUE) ) {
?><div id='section_title'>Daytime Telephone</div><div id=section_detail'><?php
echo get('daytime_number');
?></div><br /><?php
}
?>
But when I try and test if a multiline variable is TRUE using the following code...
<?php
if ( get('business_address')!=' ' ) {
?><div id='section_title'>Address</div><div id=section_detail'><?php
echo get('business_address');
?></div><?php
}
?>
It always returns as TRUE even when the variable is empty. In the HTML, a comment is being generated like this...
<div id='section_title'>Address</div><div id=section_detail'><p><!-- PHP 5.x --></p>
</div>
Any help or pointers you could provide me with would be greatly appreciated!
Thanks, Andy.