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 numbers from a string using PHP: Work on most PHP version (even 7.x)

Out put:

That’s it, very easy

Last update: 01:57:18 AM, 20th June 2018
Share.

About Author

Leave A Reply