Hi,
i am trying this line to retrieve the coutry from ths following source code :
preg_match_all("/<select name=\"coutry\".*?(<option>.*?<\/option>)+.*?<\/select>/s", $page, $result);
[SOURCE CODE BEGINING ]
<select name="coutry">
<option>country1</option>
<option>country2</option>
<option>country3</option>
</select>
<select name="city">
<option>city1</option>
<option>city2</option>
<option>city3</option>
</select>
[SOURCE CODE END]
But this don't work. By modifying this regular expression, i hardly retrieve all "<option>.*?</option>" matches, but i really need to only get country entries (i would like to get an array with these values : "country1", "country2" & "country3".
Is there someone to help me doing this ?
Thanks a lot.
Cedric.
i am trying this line to retrieve the coutry from ths following source code :
preg_match_all("/<select name=\"coutry\".*?(<option>.*?<\/option>)+.*?<\/select>/s", $page, $result);
[SOURCE CODE BEGINING ]
<select name="coutry">
<option>country1</option>
<option>country2</option>
<option>country3</option>
</select>
<select name="city">
<option>city1</option>
<option>city2</option>
<option>city3</option>
</select>
[SOURCE CODE END]
But this don't work. By modifying this regular expression, i hardly retrieve all "<option>.*?</option>" matches, but i really need to only get country entries (i would like to get an array with these values : "country1", "country2" & "country3".
Is there someone to help me doing this ?
Thanks a lot.
Cedric.