REally need help with preg match/replace/split

Discussion in 'PHP' started by cornetofreak, Jul 14, 2008.

  1. #1
    hey doods need a little help splitting a text file :(

    the text file looks like this

    [platform][TAB][company][TAB][program][TAB]version[reg info][TAB] [platform][TAB][company][TAB][pro..."RoyalBlue"]www.genie-soft.com[/COLOR][/CODE]
     
    cornetofreak, Jul 14, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    foreach(explode("\n", file_get_contents('file.txt')) as $line)
    {
    list($platform, $company, $program, $version, $reginfo) = explode("\t", $line);
    /* Do something with them all... I dunno what your DB is like.
    }
     
    Danltn, Jul 14, 2008 IP