I have several php pages called with a variable attached called ID...
I need to would then need the php code to get the record from the 4th line (because ID=4) of a file called cities.txt. This record has 3 parts to it seperated by ":" I want to call "title", "city" & "state".
This is what I have...
$filename = "/html/cities.txt";
$fp = fopen($filename,"r");
$contents = fread($fp, filesize($filename));
$record = explode(":", $contents[$ID]);
$title = $record;
$city = $record;
$state = $record;
This is returning nothing, plus I don't really want to read the entire file into $contents when I only want a particular line from the file. Please help.
Thanks in advance,