true is getting changed to 1
false is getting changed to 0
I can't just compare numbers, because some of the items in the array are numbers. I'd rather not look for string values of 'true' and 'false', because I have other code that needs to use the triple equal signs === so that things work properly.
What is the deal?
here is some code
$fields = array(
array(
'formtype' => 'input',
'required' => true,
'maxlength' => 10
),
array(
'formtype' => 'input',
'required' => false,
'maxlength' => 2
));
$total_fields = count($fields);
for ($x = 0; $x < $total_fields; $x++)
{
//output inner arrays
foreach ($fields[$x] as $key => $value)
{
echo 'key=' . $key . ' | value=' . $value . '<hr>';
}
}