Finding an empty line in an array
Posted: Sat Jan 14, 2006 3:15 am
I am trying to separate the header from the content in an emlx message. After the header is always a blank line, so I am trying to search for this within the message:
However nothing is ever echoed so the if statement never evaluates true. What can I search for to find an empty line?
Thanks
Mark
Code: Select all
$mailLines = file('/mail.emlx');
for ($i = 0; $i < count($mailLines); $i++) {
if ($mailLines[$i] = "") {
echo "First line of message<br>";
$i++;
echo "$mailLines[$i]<br>";
}
}Thanks
Mark