Remove Blank Spaces from Mobile Number using PHP preg_replace
<p>We have mobile numbers stored in db in format 0789 121 928</p>

<p>We need to remove the blank spaces from the number so it is 0789121928</p>

<p>This is what I have used before to remove ',' in $ fields, and am trying to modify.</p>

<pre><code>&lt;?php
$value1A = $row_person_select['mobile'];
$value1A = preg_replace("|,|","",$value1A); // Strips out commas in incoming value ie 2,340.00 &gt; 2340.00
$totalA = $value1A;
echo $totalA; 
?&gt;
</code></pre>

<p>I have tried the obvious of replacing the ',' with ' ' but does not work?</p>

<p>Ideas? Thank you.</p>
