dingus Posted December 19, 2008 Share Posted December 19, 2008 hey guys this is a simple questions but probably a complicated answer basicly im querying a soap server and it is returning a unique identifyer which is ment to be a string, but php is assiging it as a float and rounding, how can i force it to keep it as a string? Link to comment https://forums.phpfreaks.com/topic/137638-force-string-on-php-soap/ Share on other sites More sharing options...
sloth456 Posted December 19, 2008 Share Posted December 19, 2008 Can you go more into depth. Show some code. I can't think of a reason off the top of my head why php would automatically change a string it gets from an external source. Link to comment https://forums.phpfreaks.com/topic/137638-force-string-on-php-soap/#findComment-719661 Share on other sites More sharing options...
redarrow Posted December 19, 2008 Share Posted December 19, 2008 Read this please.. Dont think there a way to force a string to a type not sure theo... <?php //gettype will tell you the type the string is intriger so on. //example $name="redarrow"; echo " ."gettype($name)." "; // there also the is_string() and is_int() ?> Link to comment https://forums.phpfreaks.com/topic/137638-force-string-on-php-soap/#findComment-719672 Share on other sites More sharing options...
dingus Posted December 19, 2008 Author Share Posted December 19, 2008 i have no code to show as i don't know how to do it , basically I'm calling information from a soap server how ever the server is returning a unique identifier that is between 12 and 18 decimal digits in length my problem is simple for the longer ones php is making them a float and rounding to something along the lines of 4.356E13 etc now because i need to use this as a unique identifier latter on this wont do how can i tell the soap client it is meant to be a string? Link to comment https://forums.phpfreaks.com/topic/137638-force-string-on-php-soap/#findComment-719684 Share on other sites More sharing options...
dingus Posted December 20, 2008 Author Share Posted December 20, 2008 *bump* Link to comment https://forums.phpfreaks.com/topic/137638-force-string-on-php-soap/#findComment-720301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.