反序的应用,主要是strrev() 以及 array_reverse的应用,当然还有explode和join.
直接上代码
<?php
/**
* reverse using
*
*
*/
$word = "just test";
echo strrev($word);
$s = "Once upon a time there was a turtle.";
$words = explode(" ", $s);
$words = array_reverse($words);
$s = join(" ", $words);
echo $s;
// $reversed_s = join(" ", array_reverse(" ", $s));
?>
再次声明,写这个的目的不是技术,而是有时候用到的时候方便查询。并不是什么高深的技术。对于大神来说太基础。不过感觉还是很有用。。