Page 1 of 1

make variables out of a string

Posted: Mon Jun 08, 2009 11:37 pm
by lovelf

Code: Select all

 
$variablex='hello world';
 
How to store 'hello' as one variable and 'world' as another? - considering the space is a separator.

Re: make variables out of a string

Posted: Mon Jun 08, 2009 11:47 pm
by requinix
The easiest way would be to explode the string into tiny little bits. Figuratively.