November 20th, 2000, 06:48 PM
I know how to load a file into a script, I was just wondering how to take this information, which is from a text file, and put the text in there into an array.
for example the text string is this "netprofit 2.3% schools 4.5%" I want to be able to break this apart and list the values into a table. I want to open the file, and be able to list the values, 2.3%, and 4.5% from a array.
Do I need to use the explode function to do this?
If someone would help me out I would be very greatful. Thanks in advance.
November 20th, 2000, 07:42 PM
well, first of all, you would use file() to get the file, which puts each line of the file in a new element of an array. After that, you could use explode() to divide each part of a line into array elements. Look in the php.net manual for specific use.
November 21st, 2000, 01:07 AM
Thanks, that file() to put it into an array is exactly what I needed.