AV1611 Posted December 28, 2006 Share Posted December 28, 2006 I'm parsing out a text file no problem, but I need to snip the first two lines every time. Is there an easy way other than setting up a counter that starts parsing on line three?i.e.$L=0foreach ($lines as $line_num => $line) { if $L(>=2){ parse; } else{ $L++;} }or whatever... Link to comment https://forums.phpfreaks.com/topic/32058-solved-parsing-out-text-file/ Share on other sites More sharing options...
craygo Posted December 28, 2006 Share Posted December 28, 2006 if you have it in an array just have it start. foreach is a loop so no need to add in the loop[code]foreach ($lines as $line_num => $line) { if($line_num > 2){ parse; }[/code]Ray Link to comment https://forums.phpfreaks.com/topic/32058-solved-parsing-out-text-file/#findComment-148802 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.