Hi all,
I'm learning as I go with PHP, and I can't figure out why my boolean code isn't working:
The problem is that my $return var is getting set with either 'y' or 'xy', when it should only be 'x' or 'y'. I'm clearly doing something fundamentally wrong. What is it?
I'm learning as I go with PHP, and I can't figure out why my boolean code isn't working:
Code:
$backflag == false;
$roomspecs = explode ( '/', $roomdetail[1] );
foreach ( $roomspecs as $roomspec ) {
if ( strtolower ( substr ( $roomspec, 0, 1 ) ) == 'c' ) {
$backflag == true;
$return == 'x';
break;
}
}
if ( !$backflag ) {
$return == 'y';
}