Re: [PHP] Get the shortened browser / HTTP_USER_AGENT

2007-01-20 Thread Sergiu Voicu
You have several options: 1. using regular expressions 2. using arrays 3. using substrings Sergiu Wikus Moller wrote: Hi. I want to strip everything after a / in the HTTP_USER_AGENT for example: Opera 9.10/blah/blah would become only Opera 9.10 Lets say $user = $_SERVER["HTTP_USER_AGENT"

[PHP] Get the shortened browser / HTTP_USER_AGENT

2007-01-19 Thread Wikus Moller
Hi. I want to strip everything after a / in the HTTP_USER_AGENT for example: Opera 9.10/blah/blah would become only Opera 9.10 Lets say $user = $_SERVER["HTTP_USER_AGENT"]; $browser = ("/", $user); Is this correct? Isn't something needed in the browser variable? Thanks Wikus -- PHP General Ma