I am having a problem a problem with retrieving parenthesis value from url. I am developing a PHP project using CodeIgniter Framework.
I have a mvc url format like this - http://localhost/controller/action/id/name
Then I passed the value like this - http://localhost/controller/action/2/test%20(test)
And like this as well - Then I passed the value like this:
So my action function is like this with parameters-
function action($id,$name)
{
$name = urldecode($name)
//I find the index of start "t"
echo strpos($name,'t'); //this is working find
echo strpos($name,'('); // this is outputing nothing
echo $name; // this is outputing test (test)
}
What is the problem ? Why cannot I find index of "(". Actually I and retrieving record from database using that value. But parenthesis is not working well with php. I showing output correctly. But cannot find index of it.