if row1 and row2 are both empty echo row3
Posted: Sun May 10, 2009 7:17 am
Hello guys,
I'm trying to print some data (C) only when data (A) and data (B) are'nt there (because the user wouldn't had written in the CMS) :
This code seems to work, but I'd like to ask you if the 'AND' operator is correct there, or if the whole code is working just for other reason I'm missing (I don't trust myself at all !)
Thanks for any input
I'm trying to print some data (C) only when data (A) and data (B) are'nt there (because the user wouldn't had written in the CMS) :
Code: Select all
<?php
$dataA = get_meta('dataA'); //get_meta is one of the CMS functions
$dataB = get_meta('dataB'); //idem here
if ( empty( $dataA) AND empty( $dataB) ) { echo dataC(); }
?>Thanks for any input