regular expressions

    Date: 12/11/05 (PHP Community)    Keywords: no keywords

    EDIT: nevermind, it seems to be functioning as is.

    i'm receiving a data feed that comes through kind of like this:

    HTTP OK here is your data legal disclaimer blah blah blah column1,column2,column3,column4
    something,some stuff,some data,hellosomething,some stuff,some data,hellosomething,some stuff,some data,hello


    a giant stream of plain text. what i'd like to do is get the data into an array, so that i might have something like this:

    $data[0] == "something,some stuff,some data,hello"
    $data[1] == "something,some stuff,some data,hello"
    $data[2] == "something,some stuff,some data,hello"

    which would allow me to work with each line.


    preg_match_all("|(.*)|U",$data_fetch,$data);


    this looks like it's taking all of the data lines and putting everything into one array element. what would be the proper expression to parse out each data line individually?

    Source: http://www.livejournal.com/community/php/377888.html

« Menus || Best Practice for a dynamic... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home