I have a string and I'm trying to get only the numbers, which is currently working.
My problem is that I just want to get the numbers before the word results and ignore everything else.
Here's an example string:
echo '381,000,000 results 1. something here 12345566778898776655444';
$theContent = preg_replace('/\D/', '', $theContent);
echo $theContent;
How can I just get the numbers before the word results and ignore results and everything after that?