This question already has an answer here:
code:
courses.php?search-result=sap+bo+training+in+india
In this code I am fetching data from mysql and now I want to remove training in india with due to this I am using rtrim() function in php like this:
$course_n = $_GET['search-result'];
Through this I can get the value from url i.e. (sap bo training in india) but when I am using rtrim() function it show me only (sap b) but I want (sap bo) and want to remove (training in india).
$course_n = $_GET['search-result'];
$course_name = rtrim($course_n,"training in india");
echo $course_name;
output:
sap b
So, How can I fix this problem ?Please help me.
Thank You
</div>