1

I have some php code that uses curl to fetch a webpage - a portion of the html code is:

<select class="select" id="type" name="type">
  <option value="1" selected="selected">Weight</option>
  <option value="90160124">Body Fat</option>
  <option value="90160125">Percent Water</option>
</select>

Any regex boffins out there. I would like to grap some data and put it in an array where I can use it later.

so something like:

data[0,0] = 1, Weight
data[1,1] = 90160124, Body Fat
data[2,2] = 90160125, Percent Water
Code Lღver
  • 15,573
  • 16
  • 56
  • 75
Greg
  • 1,715
  • 5
  • 27
  • 36
  • how are the values coming in your HTML in first place? – NoobEditor Aug 11 '14 at 11:05
  • I"m using curl and then saving the output to $output. I have tried using preg_match but dont seem to be able to get the regex correct for the match – Greg Aug 11 '14 at 11:21

0 Answers0