I have table like this -> http://jsfiddle.net/jurisKaste/FvgeQ/
And I need to get array of all those numbers from id column…
im using php code and I have so far this piece of code from here.
i must use php only!
Get number from a string
how could i modify this regexp to get a bit readable array ?
so the complete code look like this
$data = str_replace(",", ".", $data); // $data is that html code from fiddle!
preg_match_all("/[+-]?\d+[\d\.Ee+]*/", $data, $matches);
var_dump($matches);
edit:
what about this ?
$data = str_replace(",", "", $data);
preg_match_all("/[0-9]{5,6}/",$data,$matches);
print var_dump($matches);
it works for me…
1 Answer