db insert返回带有数值的乱码值

Assuming this is a host issue, but I don't see how it could be reading wrong (works perfectly on locahost)

I an returning an array called $result, for this instance of the loop, $v is a telephone number

$k = 'phone'; $v = '(555) 555-1212)';

I have tried

$result[$k] = preg_replace('/(\W*)/', '', $v);

I have also tried

$result[$k] = preg_replace('/[^0-9]/', '', $v);

I have received values for $v of anything from -198040413 to 1260583916 expected result would be 5555551212

echoing results to page for both cases gives expected result, so its not a preg_repalce issue, must be db issue

I know this is not an int limit issue, I am using a varchar(10) for testing the problem

host is Arvixe.com using PHP 5.3.27, I have had other conflicts with them, but preg_replace should be pretty straight forward code (you would think)

Found the issue, it was with the insert

I was inserting into a varchar using i as type, changing it to s as type fixed it

// does not work
bind_param('i', $phone);

// does work
bind_param('s', $phone);

when inserting into a varchar field