very, strange. if I change it to c / o Company XYZ ( with spaces between each character) it becomes: c 1 o Company XYZ. if I change it to c#o Company XYZ it becomes c1o Company XYZ On Wed, Oct 1, 2008 at 12:16 PM, Al <news@xxxxxxxxxxxxx> wrote: > > > Tanner Postert wrote: > >> ignore previous. sorry. >> >> I'm trying to display values from a database, the values come from the >> database like this: >> >> [0] => Array >> ( >> [id] => 5 >> [order_id] => 10 >> [key] => ship_to_name >> [value] => John Anderson >> ) >> [1] => Array >> ( >> [id] => 6 >> [order_id] => 10 >> [key] => ship_to_address >> [value] => c/o Company XYZ >> ) >> >> etc. >> >> so i am rolling thru that array and making a new array by: >> >> foreach ( $data as $k = $v ) { >> $new[$v['key']] = $v['value']; >> } >> so that i have 1 array. >> >> The problem is that somewhere along the way the string "c/o Company XYZ" >> is >> becoming c/1 Company XYZ. >> >> I added a print_r after every iteration to see what its looking like along >> the way: >> >> foreach( $data as $k=>$v ) { >> error_log( "new" . $v['key'] . " = " . $v['value'] ); >> $new[$v['key']] = $v['value']; >> error_log( print_r( $new, true ) ); >> } >> >> and I get: >> >> new ship_to_name = Gordon Anderson >> Array >> ( >> [ship_to_name] => Gordon Anderson >> ) >> new ship_to_address = c/o Company XYZ >> Array >> ( >> [ship_to_name] => Gordon Anderson >> [ship_to_address] => c/o Company XYZ >> ) >> new ship_to_address_2 = 1100 S Baldwin >> Array >> ( >> [ship_to_name] => Gordon Anderson >> [ship_to_address] => c/o Company XYZ >> [ship_to_address_2] => 1100 S Baldwin >> ) >> new ship_to_city = Oxford >> Array >> ( >> [ship_to_name] => Gordon Anderson >> [ship_to_address] => c/1 Company XYZ >> [ship_to_address_2] => 1100 S Baldwin >> [ship_to_city] => Oxford >> ) >> ... and it looks the same for the remaining iterations. >> >> >> how did the string change in the middle of that for loop? >> >> This also only happens on one machine. the production environment, which >> his >> Redhat, it doesn't happen on my development env, which is Fedora 9. >> >> Thanks in advance. >> >> > What happens if you change the "/" to another character, e.g., "#"? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >