I write a code to fetch emails of all users and then save them in a txt file but some users don't have and email because they registered using phone number
so when i am trying to fetch
it dump in txt file like
http://prntscr.com/5wf7cv
I want if cell is empty/NULL don't fetch anything Anyone can help me to Fix it?
$sql=mysql_query("SELECT * FROM user ");
while($row = mysql_fetch_array($sql)) {
$email = $row['email'] ;
$fp = fopen("emaillist.txt", "a");
$savestring = "
$email";
fwrite($fp, $savestring);
fclose($fp);
}
echo "DONE ";