php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38858 Feature Request: file_get_line (get a line from a file)
Submitted: 2006-09-16 23:31 UTC Modified: 2012-05-13 07:59 UTC
From: toasty2 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.0RC4 OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: toasty2 at gmail dot com
New email:
PHP Version: OS:

 

 [2006-09-16 23:31 UTC] toasty2 at gmail dot com
Description:
------------
It would be very very very nice to have a function in php that will find a line in a file and save it to a variable. A function with a name such as "file_get_line" would be good.

Usage would be like:
$line = file_get_line(5);
5, being the line to retrieve. If there's any other arguments you think would be necessary or useful, go ahead, as long as it is capable of doing the basic feature I requested, it's good!

Thank you, hope you implement it!
Have a nice day.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-13 07:59 UTC] stas@php.net
-Status: Open +Status: Not a bug -Package: Feature/Change Request +Package: *General Issues
 [2012-05-13 07:59 UTC] stas@php.net
fgets() would do what you want.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 14:01:34 2025 UTC