Showing posts with label PHP Interview Questions. Show all posts
Showing posts with label PHP Interview Questions. Show all posts

Friday, August 2, 2013

PHP Interview Questions

In how many ways we can retrieve the data in the result set of MySQL using PHP?
You can do it by 4 Ways
1. mysql_fetch_row.
2. mysql_fetch_array
3. mysql_fetch_object
4. mysql_fetch_assoc
2.How can we extract string ‘hotmail.com ‘ from a string raghav.cool@hotmail.com using regular expression of PHP?
preg_match(”/^http://invalid.invalid/@(.+)$/”,’raghav.cool@hotmail.com’,$found);
echo $found[1];