Hi there,
I got this array issue:
this array I use on my site:
PHP Code:
$nbr = Array ( [solutionactief1] => yes, [solutionpositie1] =>, [solutionactief2] => yes, [solutionpositie2] => [eventpositie3] => );
I search this array for a key with the value "yes"
PHP Code:
$tel_yes = 0;
foreach ($nbr as $value) {
if($value =="yes"){
echo "- ".$value." | ".$tel_yes."<br>";
}
$tel_yes++;
}
unset($value);
Now I'm looking to get the name of the index. F.E. if "solutionactief1" is "yes" I need the "solutionposition1" as well.
So I thought to substract the "1" out of the index name and combine this with "solutionposition" to get "solutionposition1".
But I can't catch the index name.. Who can help me out here?.
_j