Two questions regarding manipulating strings and Files


#1
  1. How would I be able to repopulate fields using line from a file? I tried this code
    [php]echo "FIRST NAME: "; [/php]
    to repopulate the first name but could not understand how to pull the fields from the file.

  2. How do I search through a file line by line? I have tried the fgetcsv() but did not know how to fully use it. Do I have to loop through each line? If so, how would I go about it?

If you have examples or a walk through on these concepts, I would greatly appreciate it!


#2

Need more information. What type of file? What is the structure? fgetcsv is for a csv file. Is that what you are trying to parse?

https://www.w3schools.com/php/func_filesystem_fgetcsv.asp