getting .text() of children elements from jQuery()
<p>I'm having trouble to get the proper formatted texts of each child elements, either as an Array or in as text.</p>

<p>I had tried</p>

<p>var name= jQuery(".childOne").text();
var number = jQuery(".childTwo").text();</p>

<p>but it joins all the name/number text in name and number.</p>

<p>HTML is:</p>

<pre><code>&lt;span class="parent"&gt;&lt;span class="childOne"&gt;David&lt;/span&gt;&lt;span class="childTwo"&gt;541&lt;/span&gt;&lt;/span&gt;
&lt;span class="parent"&gt;&lt;span class="childOne"&gt;Gruce&lt;/span&gt;&lt;span class="childTwo"&gt;162&lt;/span&gt;&lt;/span&gt;
&lt;span class="parent"&gt;&lt;span class="childOne"&gt;Proman&lt;/span&gt;&lt;span class="childTwo"&gt;743&lt;/span&gt;&lt;/span&gt;
</code></pre>

<p>and I need to generate output in multi-dim-array so that each child-element's-text can be figured out properly.</p>

<p>Preferred output can be in array or in any form.</p>

<pre><code>Array
(
    0 = &gt; array (
            0 =&gt; "David",
            1 =&gt; "541"
        ),

    1 = &gt; array (
            0 =&gt; "Gruce",
            1 =&gt; "162"
        ),

    2 = &gt; array (
            0 =&gt; "Proman",
            1 =&gt; "743"
        )
)
</code></pre>
