can any tell how to remove characters after ? in php. I have one string test?=new i need to remove the characters as well as = from that string.
Shortest one:
echo strtok('test?=new', '?');
If you want to keep the question mark, the solution is almost the same:
echo strtok('test?=new', '?').'?';