| Posted by john.d.mann@sbcglobal.net on 01/15/06 15:36 
Charlie King wrote:> (comp.lang.php) "zek2005" <esapoznik@gmail.com> wrote:
 >>I have a varchar field in my DB with numeric values separates by
 >>spaces. I need to extract the numbers to create an array.
 >>Example 1: 1820 1823 1825 --> need to be transform into
 >>1820
 >>1823
 >>1825
 >
 > $myArray = explode(" ", $myString)
 >
 > explode() splits up the string in its second argument at each
 > ocurrence of the string in its first argument, and returns the results
 > into an array.
 >
 > The manual http://fr.php.net/manual/en/function.explode.php
 > gives good examples.
 >
 > Cheers
 >
 
 Exactly - I was going to say the same thing if no one else had yet :)
  Navigation: [Reply to this message] |