Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Reading next line

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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;
}
}
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron