I have a large while loop function, every time it gets loaded for check with current URL name. So I need to know which one is better to check the UR
If you're only goal is to check if an URL exists in the array I'd go for in_array. Altough the best way is having keys set so you can just search by array key. That way you save alot of looping.
$searchword = "test"; echo $array[$searchword];