How can I separate units from number (like 30px = 30 + "px") in PHP?
<p>I'm looking for a way to separate number from its unit - like 400px (400 + px), 30em (30 + em), 5% (5 + %) etc.</p>

<p>It's perhaps something simple but I couldn't find any pre-made functions in PHP manual to do that.</p>

<p>Let's say that I have this:</p>

<pre><code>$variable = "50px";
// and this is what I need:
$result = array(50, 'px');
</code></pre>
