I'm trying to check my php url up to the point before the query string begins.
Currently I have this: http://example.com/my-post-here.php?utm_source=webclick&utm_ad_id=123
so im only trying to check for my-post-here.php
The code I'm working with so far is:
$url = trim($_SERVER["REQUEST_URI"], '/');
echo $url;
This has worked fine up until i added the code after my-post-here.php
so how do I still continue to check for only my-post-here.php
and disregard everything else?