Skip to content

Instantly share code, notes, and snippets.

@alancoleman
Last active December 19, 2015 22:38
Show Gist options
  • Save alancoleman/6028317 to your computer and use it in GitHub Desktop.
Save alancoleman/6028317 to your computer and use it in GitHub Desktop.
Use strpos to to establish a string in a url and use as an argument
<?php
if( strpos( $_SERVER['REQUEST_URI'], 'my-url' ) !== false ) {
// Do something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment