Reading next line

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Sat Nov 16, 2002 4:00 am

hm...
$file=file("file.txt");
for ($i=0; $i < count($file); $i++)
{
if (preg_match ("/^Level/", $file[$i]))
{
// line is yours
$line_number_is=$i+1;
}
}

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests