Working with PHP Octals and String conversions

前端 未结 5 746
暖寄归人
暖寄归人 2021-01-13 02:47

I\'m working with a database that has a bunch of serial numbers that are prefixed with leading 0\'s.

So a serial number can look like 00032432 or 56332432.

5条回答
  •  悲&欢浪女
    2021-01-13 03:25

    Everything from the database is automatically a string. Integers are strings, dates are strings, dogs are strings.

    If you are doing something weird, convert anything to a string by: $a = (string) 12;

提交回复
热议问题