really need help from u guys as soon as possible abt the boolean function TQ

Problem: result show value “1” but i want to echo the 2dimensional array instead of the return value “1” if the function return true…hope can get solution from u guys soon coz it is really urgent( my project have come to dead line by 2mrw) Thanks you

Problem keyword: print_r($People) //the 2dimensional array not the return value “1”;

<?php function boolean() { $People = array(array(10, 10 , 10), array(5, 0.75 , 25), array(5, 1.15 , 7) ); return true; } $results=boolean(); echo "
";
print_r ($results);
?>

Your function boolean() not make sense - it always returns true, and the array $People defined within this function. If you need this array to be available outside the function you need to either define as global, or pass resulting array via return.

Sponsor our Newsletter | Privacy Policy | Terms of Service