About 1,310,000 results
Open links in new tab
  1. Converting an integer to a string in PHP - Stack Overflow

    Jun 24, 2009 · PHP is loosely typed. What was an integer once, can be a string as well, e.g. when you echo it (used in so called string context).

  2. How do I convert a string to a number in PHP? - Stack Overflow

    Dec 16, 2011 · here the situation is bit different I want to convert any string (contains only numbers) to a general number. As U may know in javaScript we can use parseInt () to convert string=>int or …

  3. php - How can I convert an integer to string? - Stack Overflow

    Jul 30, 2011 · 4 PHP is dynamically typed, so your var is both a string and an integer However, you can do type casting like so

  4. Fastest way to convert string to integer in PHP - Stack Overflow

    Aug 21, 2015 · Using PHP, what's the fastest way to convert a string like this: "123" to an integer? Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an …

  5. php - How to get int instead string from form? - Stack Overflow

    Got answers that it returns always string and they offered me to use (int) or intval (), but then if it's really string like 'a' it returns 0, but it may be also integer value 0, how to overcome this problem?

  6. Convert number to string in php - Stack Overflow

    Jul 15, 2012 · It's failing because it's prefixed with a 0, making PHP attempt to interpret it as an octal number, where 8 is not a valid octal digit as it parses the string, so you get 0.

  7. Convert a comma-delimited string into array of integers?

    Note: When using == operator instead of === , your string values are automatically converted into numbers (e.g. integer or double) if they form a valid number without quotes.

  8. php string to int - Stack Overflow

    1 Replace the whitespace characters, and then convert it (using the intval function or by regular typecasting)

  9. Cast string to integer in PHP - Stack Overflow

    Aug 25, 2015 · I've been trying to convert string to int in PHP to operate on it, but PHP keeps interpreting it as 0.

  10. PHP: How to convert bigint from int to string? - Stack Overflow

    12 I want to be able to convert big ints into their full string derivatives. For example.