Extract numbers from a string using php

0
Extract numbers from a string using php
4.8 (95%) 8 votes

This is simple way to extract all number of a string and output to array. For example, you could extract number from a string like this: “There is 3 dogs in the box”. So output you will get number “3”
Here is how i extract it using PHP: Work on most PHP version (even 7.x)

 

That’s it, very easy

Last update: 02:31:35 AM, 23rd December 2017
Share.

About Author

Leave A Reply