Click to See Complete Forum and Search --> : Chop up a variable


AmazingAnt
07-10-2006, 09:39 PM
I've got a variable that has a few different pieces of information, and each piece is seperated by a specific symbol. It's kinda like a csv file, except that it's using dashes "-" instead of commas "," to seperate each piece of data. No, the information isn't in a file, just the variable. How can I split the variable apart at each dash, and send it into an array?

hyperlisk
07-10-2006, 09:57 PM
$someArray = explode("-",$someVariable);

AmazingAnt
07-10-2006, 10:07 PM
Thanks!