Joined April 2019
·

Mrityunjay

Developer at GRIT Technologies
·
Dhanbad
·
·

Posted to Reverse words in a sentence - PHP over 1 year ago

I think this too will fulfill the purpose?

$str="The lazy dog jumped over the fox";

$ex=explode(" ",$str);

$count=count($ex);

for($i=$count;$i>=0;$i--){

echo $ex[$i];
echo " ";
}

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills