Jump to content

weina67

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

weina67's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so I'm having so much trouble understanding preg_match. I'm trying to use curl to request data from quantcast.com for sites like google.com and then use php to parse the html output. For example, the html embodies the following: <tbody> <tr class="current "> <td class="title"> <a href="/digg.com"> digg.com </a> </td> <td class="reach digit"> 12.6M <p class="label"> Monthly US People</p> </td> How do I parse the code to get the 12.6M Month US People? I want to get the "12.6" from the html code above. What preg regular expression should I use? I'm so confused! Anyone who could help, I would be so grateful. Thanks Just to clarify ... I wanted to use preg_match. Like parse the code $regexp = '#<td class="reach digit">(.*?)</td>#si'; preg_match($regexp, $response, $matches); to get the 12.6M. But I keep using the wrong regular expression so $matches arrays remains empty.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.