I'm completely brand new to PHP and coding in general. I've been reading and studying for a couple of days and I'm making some progress, but now I'm stuck, and I'm sure its pretty basic stuff.
I need to read a text file into an array, which I've done ( I think ):
<?php $tcontents = file ("./$course_dir/$tutorial.txt"); ?>
I am able to print this file line by line to the screen. I am able to edit the file in a textarea and save it to another directory...
BUT what I really need to do is only display one line at a time, edit that line and then save the file. Hitting a next button (I'm using a form) should save and move onto the next line.
I'm having a hard time understanding how to navigate my array and pass the array and the current value of the variable pointer (key?). I've been working through the PHP Bible, but I seem to have some sort of mental block.
Any ideas or explanations would be greatly appreciated. Thanks in advance.