codedragon Posted November 6, 2014 Share Posted November 6, 2014 Hi folks, I need urgent help with code here.I'm asked to create a data form that accepts odd number of words in a given sentence Say for example,I enter "Hello my name is Jason Smith Flaunders" The code output should be :Flaunders Smith Jason is name my Hello It should also display the number of words. Output:Smith Jason is name my Hello words=7. Can anyone help me to create the data form that outputs this? Please help me guys.Its for my univ purpose. Thanks. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 6, 2014 Share Posted November 6, 2014 Functions to look at are explode() count() array_reverse() Join() or implode() Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 6, 2014 Share Posted November 6, 2014 How much is the assignment worth to you? :) Quote Link to comment Share on other sites More sharing options...
hansford Posted November 7, 2014 Share Posted November 7, 2014 (edited) Lol - I wrote the code and was going to post it, but the Guru's outrank me and they are right. They gave you all of the functions you need to make this happen. Good luck - it will be rewarding. Edited November 7, 2014 by hansford Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.