note 33740 deleted from function.array-reverse by didou
| From: | didou@php.net | Date: | Tue, 29 Jul 2003 14:21:21 +0000 |
| Subject: | note 33740 deleted from function.array-reverse by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52935@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster@wolfz.com
----
In light of not being able to find a string reverse, this small function will easily reverse a
string.
$temp = array();
$c=strlen($string);
for($x=0; $x<$c; $x++) {
$temp[$x] = $string[$x];
}
$temp = array_reverse($temp);
for($x=0; $x<$c; $x++) {
$string[$x] = $temp[$x];
}