Hi!
I have a gallup system and when reading contents of the gallup.dat -file (where the question and answers + amount of votes) are stored I encountered a problem.
The structure of gallup.dat -file is following:
What's the best game?
Transport Tycoon>>10
Tropico>>1
Railroad Tycoon>>7
I use file-function to read the whole stuff into an array and $array[0] is the question. But now I need to know how to make these option>>amount -pairs to assosiative array?
Like ...array(Transport Tycoon=>10; Tropico=>1.. etc
The problem is that all the stuff from the file is already in array (numerical array, not assosiative). If I could get assosiative array to work it's much more easier to do the rest of code, like "total value of votes = $array_values" :-)
Did you get the point? ;-)