Hi all,
I've got an array that's built from a query.
$qArray = ("Blue", "Red", "Green", "White", "Black", "Yellow", "Purple")
I've also got an array that's built from user (form) input.
$uArray = ("2", "5", "6")
I'm trying to match up the array (index) number from the User input, to the color in $qArray.
What I've got now isn't working:
$cntr = 0;
foreach ($uArray as $key=>$value) {
if ($key == $cntr) {
echo $qArray[$cntr]."<br>";
}
$cntr++;
}
Nothing echo's out.