How can I split  a 1-dimensional array to multiple arrays?
<p>This is my question please give me some hint or idea on how am I going to split 1 dimensional array to multidimensional array if it see a special character e.g - or /?</p>

<p>Example data:</p>

<pre><code>input:
array1 [] = { "name1-name2", "box1-box2" }
output:
array2 [][]= { {"name1"}, {"name2"}, {"box1"}, {"box2"}}
</code></pre>
