I'm running the following function and want to check if a value is NULL or '', but it seems to react the same for both. This prints C1C2. How can I get it to print B1C1C2? Should I use isset() somehow?
function title($a = NULL, $b = NULL, $c = NULL) {
if( $a != NULL )
{
echo 'A1';
if( $a != '' )
{
echo 'A2';
}
}
if( $b != NULL )
{
echo 'B1';
if( $b != '' )
{
echo 'B2';
}
}
if( $c != NULL )
{
echo 'C1';
if( $c != '' )
{
echo 'C2';
}
}
}
title(NULL, '', 'C');
!isnull($a)or!empty($a)is_null()