Hi all🙂 If I have the below string how can I only explode only the interger values into an array? $string="1,2,hi,453,222,bye,,,32,";
explode using comma as separator, iterate over the resulting array and filter out non-numbers.
nikko50 wrote:Hi all🙂 If I have the below string how can I only explode only the interger values into an array? $string="1,2,hi,453,222,bye,,,32,";
use a regular expression to filter out all non-numeric characters and then explode it.