Welcome Guest, Not a member yet? Register   Sign In
Input 4 first digit from column A to column B
#5

(This post was last modified: 01-09-2019, 01:14 AM by Pertti.)

So you want to access first 4 digits, regardless of what the number is?

Could probably get away with using string functions and literally get first 4 characters out of the string.

PHP Code:
$a 123486868686868;
$aString strval($a);
$b substr($aString04); 

All POST data comes in as string anyway, and PHP is quite good at converting types in and out as it is, but I added extra step in there just to point out string conversion.
Reply


Messages In This Thread
RE: Input 4 first digit from column A to column B - by Pertti - 01-09-2019, 01:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB