From: "pppsss7 on 13 Jul 2010 10:14 Hello. I have html: <h3>Header</h3> <p>Paragraph 1</p> ..... <p>Paragraph n</p> <div> <h3>Header</h3> <p>Paragraph 1</p> .... <p>Paragraph n</p> </div> need to parse it like this array: array( [0] => array( 'h3' => 'header' , 'p' => array( [0] => 'Paragraph 1' , [n-1] => 'Paragraph N' ) [1] => array( ['div'] => array ( 'h3' => 'header' , 'p' => array( [0] => 'Paragraph 1' , [n-1] => 'Paragraph N' ) ) ; maybe simple other. Which pear class i can use for this task ?
From: Andrew Ballard on 13 Jul 2010 12:53 On Tue, Jul 13, 2010 at 10:14 AM, pppsss7(a)gmail.com <pppsss7(a)gmail.com> wrote: > Hello. I have html: > <h3>Header</h3> > <p>Paragraph 1</p> > .... > <p>Paragraph n</p> > > <div> > <h3>Header</h3> > <p>Paragraph 1</p> > Â Â .... > <p>Paragraph n</p> > </div> > > need to parse it like this array: > array( > [0] => array( > 'h3' => 'header' , > 'p' => array( > [0] => 'Paragraph 1' , > [n-1] => 'Paragraph N' > ) > [1] => array( > ['div'] => array ( > 'h3' => 'header' , > 'p' => array( > [0] => 'Paragraph 1' , > [n-1] => 'Paragraph N' > ) > ) ; > > maybe simple other. Which pear class i can use for this task ? > > > Why PEAR? That looks almost exactly like SimpleXML. Andrew
|
Pages: 1 Prev: Posting values of dynamically generated text fields at a time Next: PHP question |