- implode: documentation ( source)
- explode: documentation ( source)
- array_filter: documentation ( source)
<?php
$txtnum = "Called Number Call Type Call Time Call Duration Call Charges 9231332454834 SMS2/5/2019 9:31:15 AM-- Minutes 0.00 PK 9230374555790 SMS2/4/2019 8:42:07 PM-- Minutes 0.00 PKR";
$words = explode(' ',$txtnum);
$result = array_filter($words, 'ctype_digit');
echo implode(PHP_EOL,$result);