note 33740 added to function.array-reverse

From: Date: Sun, 06 Jul 2003 03:05:54 +0000
Subject: note 33740 added to function.array-reverse
Groups: php.notes 
Request: Send a blank email to php-notes+get-51575@lists.php.net to get a copy of this message
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]; } ---- Manual Page -- http://www.php.net/manual/en/function.array-reverse.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33740 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33740&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33740&report=yes

« previous php.notes (#51575) next »