PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
My goal here is to read a txt file that has html tags in it (<TD>) then i'm going to insert whatever is between them into a database. Now the function works fine but only returns the first line in the file if you don't use a while loop, but I can't figure out why it will not work with the while loop using feof(). It just returns nothing.
You need to call fgets() or fread() inside the loop to read from the file into $data. You also might want to look a the preg_*() functions to extract the sub-string.
<TD>Nossi College of Art Mahtaban Art Scholarship/Goodlettsville,TN (Students planning a career in commercial art through study at Nossi need to see information flyer in Career & College Center. For further information visit http://www.unidial.com/~nossi.) </TD>
<TD>5 awards last year$1,800 renewable </TD>
<TD>9/1/2008</TD>
That is an example of the input. I want each <td></td> into its own column in the row of the database. What happens is the first <td></td> will be in the first column or maybe the last. I can't figure out why it's gets out of order in the first place.