Trying to find the first empty line number in my file
Posted: Tue Sep 21, 2010 2:46 pm
I am Trying to find the first empty line number in my file and i used this code this is not working i want some help
$file=file($file_name) ;
foreach($file as $line_no=>$line)
{
if(preg_match('/^$/',$line))
{
$line_no = $i;
echo $line_no;
break;}
}
$file=file($file_name) ;
foreach($file as $line_no=>$line)
{
if(preg_match('/^$/',$line))
{
$line_no = $i;
echo $line_no;
break;}
}