displaying info from .txt files in two folders in same table

http://flamencopeko.net/lyrics/index_3.php collects title of .txt files in http://flamencopeko.net/lyrics/info.

The first line in the table is the title pulled from the first line in each file, and links one level up to the lyrics files. But so does also everything else. That is the problem.

I try [php]echo ("$dirArray[$index]$content[2]");[/php] to get the song length. But this second (actually third) line is read from lyrics folder too, not from lyrics/info folder.

Info files look like this: http://flamencopeko.net/lyrics/info/10_miles_apart.txt

This is the script: http://flamencopeko.net/lyrics/index_3.txt

This is a bit hard to explain. But I think the solution is simple.

Did this 'cos it messed up the current “official page” (http://flamencopeko.net/lyrics):

Changed http://flamencopeko.net/lyrics/info to http://flamencopeko.net/lyrics_info.
Changed http://flamencopeko.net/lyrics/index_3.txt to http://flamencopeko.net/lyrics_index_3.txt.

Still not able to get the script to read anything from the .txt files in lyrics_info folder. Except for the file-names.

Take a look here: http://php.net/manual/en/function.file-get-contents.php

I read through it but have no idea on how to implement that to the code I use.

I’m fond of the [php]echo ("$dirArray[$index]$content[2]");[/php] Just one line for each piece of info (I know it’s not always considered best practice.) I just cannot get it to read from the right files / array.

Sponsor our Newsletter | Privacy Policy | Terms of Service