Some data manipulation

From: Date: Sat, 05 Oct 2002 22:48:39 +0000
Subject: Some data manipulation
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-22223@lists.php.net to get a copy of this message
hey all i have a database of arrays like this : Array ( [0] => 2- [1] => 8b2 [2] => 8#c3 [3] => 8b2 [4] => 8#f2 [5] => 4a2 [6] => 8a1 [7] => 8a2 [8] => 4a2 [9] => 4a2 [10] => 4a2 .... ) i just need to change in every string the last value when it is equal to 1,2 or 3 ex :: [0] => 2- won't be changed [0] => 2- [1] => 8b2 will be changed to [1] => 8b6 [2] => 8#c3 will be changed to [2] => 8#c7 [6] => 8a1 will be changed to [6] => 8a and so on Thanks for any help Hatem

« previous php.db (#22223) next »