Hello, SP folks!
I am extracting a number form db. After accessing the value, I want to set it to a var.
But the catch here is that this var only accepts int type. If I assign an int as below:
This turns out to be OK.
$somevar = 2009;
But when I assign the number (not int) extracted from db, as follows, it does not work:
I tried using following methods to have $somevar converted to int type, but there were no promising results:
$somevar = $table['somefield'];
$somevar's supposed to contain expiration time for cookie, if it helps helping my out.
$somevar = (int)$table['somefield'];
$somevar = intval($table['somefield']);
//2a - arg 2 is optional
$somevar = intval($table['somefield'],10);