I have a variable that contains multiple lines, each ending with a 
line-feed.

I want to create an array that contains one line per each line of text 
contained in a variable.

For example, the variable $file contains:  (with \n added for clarity)

Tony \n
Jeff \n
Jimmy \n
Tammy \n

I know how to create an array from a file, but I have this info in a 
variable, and I want to skip the step of having to write it to a file.

The real purpose is that I am grabbing html from a web sites, and then 
parsing the information.  So, I need to be able to take the source code 
from a web site that I have contained in a variable and put it into an 
array, so I can then parse the data line-by-line.

Any help is appreciated.

Thanks,

Tony

Reply via email to