[solved] How to delete text symbol from php line?

  • (2 votes)
  • Written by 
  • Tuesday, 03 April 2018 00:43
$string = 'Some Text .... 1. 2 .3.  Buy';
$string = preg_replace('~[^0-9]+~','',$string);
echo $string;
// 123 
413 Read

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.