Exctract minus sign from a variable
<p>I've a peculiar situation, I need to split variable into two parts [sign] and [number]</p>

<p>So I can have following integers (this is not a sequence, I can have only 1 integer at a time):</p>

<pre><code>-15,...,-1,0,1,...,15
</code></pre>

<p>When there is minus sign I need to split it into [-] part and [integer] part when there is no sign I need [+] and [integer]</p>

<p>How would I do this?</p>

<p>I was thinking to use explode with explode("-" but if there is no minus sign it will give errors... Any easy way to achieve what I want instead of writing multiple if functions?</p>
