I need help creating a page that will accept 2 words (strings) and will display a new word using the letters of the first and second word. it will interscalate the letter using all letter from the first word going forward and of the second one in the opposite direction. something like>
1st word: dog
2nd word: cat
new word: dtoagc
the two words that the user will enter are obtained from a textbox and it will be printed in a table>
first word >>>second word>>>new word
hope it makes sense!
thanks for your help!
Oz needs Help!!!
Moderator: General Moderators
Re: Oz needs Help!!!
This should reverse your word:
but i would assume that in order to merge the words, you would have to break it down into an array, do this using the explode function:
http://php.net/manual/en/function.explode.php
Code: Select all
echo implode(' ', array_map('strrev', explode(' ', $string)));http://php.net/manual/en/function.explode.php