PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function autoNumToArr($num){ preg_match('/\d+$/', $num, $matches); $region = $matches[0]; $number = substr($num, 0, -strlen($region)); return ['number' => $number, 'region' => $region]; } print_r (autoNumToArr("322641НС750"));
Show:  
Copy Clear