Write a regular expression to get the value xxx from the
string 'xxx@yyy.com'
Answer Posted / bipin
<?php
$string = 'xxx@yyy.com';
list($firstString,$secondString) = split('@',$string);
echo $firstString;
?>
| Is This Answer Correct ? | 9 Yes | 7 No |
Post New Answer View All Answers
What is oops php?
How to get the IP address of the client/user in PHP?
Explain array_uintersect()?
How the values are ordered in an array?
What is difference between mysqli and mysql?
Can you specify the "new line" character in single-quoted strings?
How would you declare a function that receives one parameter name hello?
What is php rest api?
Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
Which function will you use to create an array?
for image work which library?
What are static variables in php?
What is mysqli_real_escape_string?
How can you send email in php?
Which cryptographic functions in php returns the longest hash value?