Get word number x from string?

Posted on 16th Feb 2014 by admin

How can I use a function to loop through a string, and "have a look at" every word in the string, probably separated by a comma, and print them out, like this:

word 1: xxxx
word 2: xxxx
word 3: xxxx

etc, and loop till it has finished?

Other forums