<?php $url = 'https://www.example.com/pagename?a=b&c=d'; $paths = [ 'gerp', 'pagename', 'cheese', ]; $path = trim(parse_url($url, PHP_URL_PATH), '/'); if ( in_array($path, $paths )) { echo 'yes'; } else { echo 'no'; }
You have javascript disabled. You will not be able to edit any code.