I have an if statement, and I need to compare a single string with many different options. The code I post below shows what I mean pretty clear. I know 2 ways of doing this, but
http://php.net/manual/en/function.in-array.php
$centered = array ("contact","report","new"); if(in_array($Url[0], $centered)) { //Do something }