Hi guys, I need help with this problem. I am stuck with this for a very long time. I want to reverse words in a sentence without using inbuilt string manipulation functions like explode,array_reverse, substring, etc. Any data structure like stack, can be used.
input: this is phpfreaks
expected o/p: phpfreaks is this
I managed to do this in C and I've tried the same logic in PHP, but unfortunately my code is going in infinite loop. Please help me, I am new to PHP.
Thanks in advance.
rwords.php