string="http://domain.com?id=1234&name=john";
if the name is random, how do i remove the string from "&name" till the end of string?
tks
Well, it depends. One way is to use [man]parse_url/man and [man]parse_str/man and then reconstruct the URL without that name/value pair. Another way, taking your question literally, is to use [man]substr/man with [man]strpos/man.
hey tks man.. got it working..
You're welcome 🙂 Remember to mark this thread as resolved (if it is).