Simple preg_match question

Discussion in 'PHP' started by Hade, Jun 27, 2009.

  1. #1
    I'm pulling my frickin hair out. I have spent hours at this and failed miserably.
    Can someone please provide me with the regular expression to extract an array with the two sections please.
    IE the printer type and the colours.

    THANK YOU.


    <tr>
    <td width="145" align="right" valign="top" bgcolor="#cccccc"><strong>Printer Type:</strong> </td>
    <td width="5" align="left" valign="top" bgcolor="#cccccc">&nbsp;</td>
    <td width="330" align="left" valign="top" bgcolor="#cccccc"><a href="printer.php?man=Epson+Printer&cat=0" class="smalltext" onClick="javascript:urchinTracker('/outgoing/device/show_data');">Epson Stylus</a></td>
    </tr>

    <tr>
    <td align="right" valign="top"><strong>Colours this printer supports:</strong></td>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top"> RED<br>
    GREEN<br>
    LIGHT BLUE<br>
    YELLOW
    </td>

    </tr>
     
    Hade, Jun 27, 2009 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sorry could you please be more speicifc on what you require
     
    wd_2k6, Jun 28, 2009 IP
  3. Hade

    Hade Active Member

    Messages:
    701
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    90
    #3
    I'm trying to scrape two fields from a html page.

    I want to get the printer type, and the printer colours.
    Thanks
     
    Hade, Jun 30, 2009 IP
  4. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do you have any code at the moment? :)
     
    Wrighty, Jun 30, 2009 IP