PHP extract all whole numbers into an array

前端 未结 4 1117
清酒与你
清酒与你 2021-01-28 15:58

I have following string:

15 asdas 26 dasda 354 dasd 1

and all that i want is to extract all numbers from it into an array, so it will looks li

4条回答
  •  后悔当初
    2021-01-28 16:25

    use preg_match: http://www.php.net/manual/en/function.preg-match.php

    check examples at site bottom.

提交回复
热议问题