Get word number x from string?


Posted on 16th Feb 2014 07:03 pm 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?

No comments posted yet

Your Answer:

Login to answer
288 Like 31 Dislike
Previous forums Next forums
Other forums

reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

simple ping code
been searchin the site/web and found code thats simple but doesnt work.

I have a personal we

trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

generating all possible random letters
hi'

how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the res

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash