'; error_reporting(0); $NumStores = 2; $Store[0] = array ('Canada','Ontario','LCBO','Some Address'); $Store[1] = array ('Canadaa','Ontario','Beer Store','Some Address'); $CountryAdded = array (); //
whatever
'); for ($i=0; $i < $NumStores; $i++) { for ($a=0; $a < 4; $a++) { if ($a == 0) { $CountryElements = count($CountryAdded); if (count($CountryAdded) > 0) { for ($b=0; $b < $CountryElements; $b++){ if ($CountryAdded[$b] == $Store[$i][$a]) { echo "startState"; } else { echo ''; array_push($CountryAdded, $Store[$i][$a]); } } }else { echo ''; array_push($CountryAdded, $Store[$i][$a]); } echo ''; } } } ?>