i m trying use following pattern
65465465465654 6546465465465465 5646545646464 6545646456 6454646456
in text area please me check preg_match pattern above input type
i want take mobile numbers separated next line character.
try this:
$numbers = "65465465465654 6546465465465465 5646545646464 6545646456 6454646456"; preg_match_all("/([0-9]*)\n/", $numbers, $resultarray); foreach ($resultarray $result) { preg_replace("/\n/", "", $result); }
output:
array(4) { [0]=> string(14) "65465465465654" [1]=> string(16) "6546465465465465" [2]=> string(13) "5646545646464" [3]=> string(10) "6545646456" }
Comments
Post a Comment