Using PHP Filters we can fully validate an email id and this filter option requires PHP 5 version. Below is the code for validating emails in PHP using filters, along with using explode and foreach loop and then inserting the correct emails in the mysql database. Multiple emails validation. Validate Emails Using Filters in PHP
Below are the list of PHP predefined Magic Constants PHP Magic Constants Name Description __LINE__ The current line number of the file. __FILE__ The full path and filename of the file with symlinks resolved. If used inside an include, the name of the included file is returned. __DIR__ The directory of the file. If used […]
If you want to loop throuh the mysql result set twice then use below way. $result = mysql_query(“SELECT * FROM my_table”);while($row = mysql_fetch_assoc($result)) {// inside the loop} The problem is, if you want to loop through the same result set again, you will get an error because the internal pointer is currently at the end […]