My url is : https://domain.com/chapter-detail.php?board=12&class=145&subject=maths
Now, I want to remove query string from the url and I want to get resultant url as : https://domain.com/chapter-detail.php
My url is : https://domain.com/chapter-detail.php?board=12&class=145&subject=maths
Now, I want to remove query string from the url and I want to get resultant url as : https://domain.com/chapter-detail.php
You can use this
$url=strtok($_SERVER["REQUEST_URI"],'?');