Breaking Up a Formatted Number
<p>Let say I have the following formatting number as a string in PHP:</p>

<p>12,345,678.97</p>

<p>How would I break that up in PHP where I would get an array like the following?</p>

<pre><code>array
(
  [0] =&gt; 12,
  [1] =&gt; ',',
  [2] =&gt; '345',
  [3] =&gt; ',',
  [4] =&gt; '678',
  [5] =&gt; '.',
  [6] =&gt; '97'
);
</code></pre>

<p>OR</p>

<pre><code>array
(
  [0] =&gt; 97,
  [1] =&gt; '.',
  [2] =&gt; '678',
  [3] =&gt; ',',
  [4] =&gt; '345',
  [5] =&gt; ',',
  [6] =&gt; '12'
);
</code></pre>

<p>I basically want to break up the string so that numbers are broken by groups and also the characters that are between groups of numbers are broken out too.  I need to do this in order to automatically determine the thousands/decimal separator in PHP for currency strings.</p>
