Jump to content

strstr question


corillo181

Recommended Posts

oh i looked at the documentation and it says php 4 and 5.

 

function username($id){

	$email = [email protected];
	$search = strpos($array['email'],'@') - 1;
	$len = strlen($email);
	$sub = substr($email,0,-($len-$search)+1);
return $sub;
}

 

this is the way i did it, those any  one have a better way?

Link to comment
https://forums.phpfreaks.com/topic/73294-strstr-question/#findComment-369821
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.