hi,
I have a list of suburbs in a Blob field in my database, I need to extract them from that and turn it into an array. The blob looks like this: suburb1, suburb2, suburb3 etc.
Thanks
$suburbs="a,b,c,d,e"; $array=explode(",",$suburbs); $array[0] contains 'a' $array[1] contains 'b' ... if there are also blanks: "a, b, c" do the same but later trim() the values to get rid of blanks
Just a technical side note: storing arrays in a single field is a database no-no. Instead, use tables and relations.
Thanks DonChris.. that's the way we ended up doing it last night.. except for the trim() function which i'll add in now.