The number is in the get
request.
1 answer
Put each line in a separate element of the array ( file () function). Then get the required line number from the GET request. Then refer to that array element whose number you received from the GET request is 1.
$str_array = file('path/to/file'); print $str_array[$_GET['line_num']-1];
- Please write the code - cas
- 2@ cas-live, why are you asking a question here and waiting for a freebie instead of reading about it yourself and sorting it out. Self development is good. - KryDos
- Yes, I understand this, but this is where I would read - cas
|