Splitting a string to an array

I have a comma delimited string in a field value. How could I split this into an array and iterate over the items in a template?

Hi Mike

This should do it:

	#set ($str = "keane,berbatov,king,woodgate")
	#set ($arr = $str.split(","))
	
	#foreach ($item in $arr)
		$item
	#end

Cheers
James

worked great!

thanks - mikeg