Third argument in strstr is only valid in PHP 5.3.0

Posted by Muhammad Sajid on Stack Overflow See other posts from Stack Overflow or by Muhammad Sajid
Published on 2010-04-15T06:59:10Z Indexed on 2010/04/15 7:03 UTC
Read the original article Hit count: 333

Filed under:

Hello I want to get user from an email address,

eg: [email protected] then output must be sajid

for this is use below mentioned code but an warning occur

$user = strstr($email, '@', true);

Warning: Wrong parameter count for strstr() in /var/www/DataTable/dialog.php on line 3

& in php manul it is clearly define that the 3rd argument true is only valid for PHP 5.3.0

So is there any string function which could solve my problem?

© Stack Overflow or respective owner

Related posts about php