fork download
  1. <?php
  2.  
  3. $sizes = "
  4. 39.5&nbsp;
  5. 40&nbsp;
  6. 40.5&nbsp;
  7. 41&nbsp;
  8. 41.5&nbsp;
  9. 42&nbsp;
  10. 42.5&nbsp;
  11. 43&nbsp;
  12. 43.5&nbsp;
  13. ";
  14. preg_match_all('/[\.\d]+/', $sizes, $matches);
  15. print_r($matches[0]);
Success #stdin #stdout 0s 82624KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 39.5
    [1] => 40
    [2] => 40.5
    [3] => 41
    [4] => 41.5
    [5] => 42
    [6] => 42.5
    [7] => 43
    [8] => 43.5
)