I had an interview and a question that seems really simple was not clicking in my mind. Just want to get the answer for it because have tried a lot and unable to find solution.
I have to write a sentence in opposite like
input => My Name Is Junaid
output => Junaid Is Name My
Should not use ANY built-in function of PHP
Thanks
EDIT
I did upto this
$string = "My Name Is Junaid";
$len = strlen($string);
for($i=$len; $i > 0; $i--){
echo $string[$i-1];
}
it results
dianuJ sI emaN yM
need some more tweaking
1 Answer