Jump to content

ereg() is deprecated?


random1

Recommended Posts

it extracts just the browser name from the string $s_browser

 

My current code is now:

 

		preg_match('/[^0-9][a-z]*-*\ *[a-z]*\ *[a-z]*/', $s_browser, $r);
		$s_browser = $r[0];
		$version_number = $this->browserVersion( $browser_user_agent, $s_browser );

 

It now complains about there not being an index of 0 on the second line.

Link to comment
https://forums.phpfreaks.com/topic/180821-ereg-is-deprecated/#findComment-953951
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.