Hi, Im currently writing some code to search an array for a key, though am having problems as the if loop I've got stops after one key has been found. the problem is that my array has multiple keys, so it needs to carry on looking! i know that it's probably a really simple thing to fix but after hours of looking at it im stumped!

You are right. It is really simple thing to fix. Just change your code so that it does not stop at the first occurrence of the key, but it searches through out end of the key list.
Good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.