checking sophisticated - nested arrays with isset()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
vecho
Forum Newbie
Posts: 3
Joined: Tue Oct 30, 2007 4:05 am

checking sophisticated - nested arrays with isset()

Post by vecho »

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
Locked