|  | Posted by Rich on 12/01/06 19:27 
On Fri, 01 Dec 2006 05:51:18 GMT, ABJAnton"<jojoaffiliate@[NOSPAM]vancouver.com> wrote...
 >
 >I am trying to wrap my head around this one.
 >
 >I have a string full of keywords seperated by commas (,)
 >
 >Example string: "example1, example2, example3, example one, example two,
 >etc"
 >
 >How would you extract each keyword and place it into an array?
 >
 >Thanks greatly
 >
 >
 >
 
 If the separator is consistent (e.g. comma or comma and space) you can use the
 explode function....
 
 $new_array = explode(",", $data);
 
 You can also use preg_split() which handles regex, but the explode() function
 would probably be the most efficient if you only had to work with a comma
 separated list.
 
 Rich
 --
 Help a Community by Participating in Ours
 We donate your subscription fees to the charity you choose
 100% of your first month, 10% thereafter.
 http://newsguy.com/charity.asp
  Navigation: [Reply to this message] |