checking sophisticated - nested arrays with isset()
Posted: Tue Oct 30, 2007 4:22 am
hi all,
i have been trying to get my array checked for existing values with isset function:
function myfunc (..., $x, $main_table, $test,....)
{
do {$x++;} while (!isset($main_table[$test[$x]]));
}
$main_table, $test, - arrays that are being passed as function parameters
$x - is a number (start index) that's also being passed as function parameter
PROBLEM: {$x++;} is not being executed cause (!isset($main_table[$test[$x]])) is being skiped or so... :/
any ideas how to fix it or get it work?
p.s. i have tried - do {$x++;} while (!array_key_exists($test[$x],$main_table)); - and still no luck
i have been trying to get my array checked for existing values with isset function:
function myfunc (..., $x, $main_table, $test,....)
{
do {$x++;} while (!isset($main_table[$test[$x]]));
}
$main_table, $test, - arrays that are being passed as function parameters
$x - is a number (start index) that's also being passed as function parameter
PROBLEM: {$x++;} is not being executed cause (!isset($main_table[$test[$x]])) is being skiped or so... :/
any ideas how to fix it or get it work?
p.s. i have tried - do {$x++;} while (!array_key_exists($test[$x],$main_table)); - and still no luck