# Php - get particular line from text file

**URL:** <https://forum.kirupa.com/t/php-get-particular-line-from-text-file/225962>\
**Category:** Uncategorized\
**Created:** [May 17, 2007, 2:29am UTC](https://forum.kirupa.com/t/php-get-particular-line-from-text-file/225962 "2007-05-17T02:29:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerryjones](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jerryjones](https://forum.kirupa.com/u/jerryjones)\
**Post date:** [May 17, 2007, 2:29am UTC](https://forum.kirupa.com/t/php-get-particular-line-from-text-file/225962/1 "2007-05-17T02:29:29Z")

</div>

i think my question is probably pretty simple, but i cant seem to find a solution that doesn’t look way too complex. basically im just trying to generate a random number (say between 1 and 100) and whatever that number is, i want to retrieve that line from a specified text file. i can generate the number, open the file and everything, it’s just a matter of getting one particular line.
