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

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

Bluetooth RSSI & VIsta
Okie I got 4 Bluetooth adapters, a DBT-120 by Dlink, A Zonet Microsoft Bluetooth which is what I use

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

Sessions work for me and not others?
I'm having a bit of bad luck with sessions. In the past they have worked fine for me, but this time

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?

I found the following whil

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

IP Logger for Voting Script
Can anybody help me place an IP logger into my voting script?
I know that maybe it is not as secu

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

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