I want to pull some car make datas from the html. This is the html data where I want to get this makes.
I tried this code but it is not working.
<?php
$data = "<select id="c1:swfield" name="c1">
<option value="--">> All Makes</option>
<option value="1167">Acura</option>
<option value="1173">Alfa Romeo</option>
<option value="1564">Smart</option>
<option value="1836">Speranza</option>
<option value="1566">Ssang Yong</option>
</select>";
preg_match_all('|<select id=\"c1:swfield\" name=\"c1\">(.*?)</select>|s', $data, $matches);
print_r($matches);
?>
I'm getting some empty arrays as output. As output I want to get values between option tags such as Acura, Alfa Romeo etc.