The PHP substr function does not accept strings converted from integers... :P
The situation
If I leave the code like this, it works:
<?php
$key = '35110100840754000150550010000014301000000809';
echo substr($key, 35, -1);
?>
And the result is right:
00000080
The problem
But I get this key from an integer variable (from the database). So the result is null and similar to what I get from this code:
<?php
$key = 35110100840754000150550010000014301000000809;
echo substr($key, 35, -1);
?>
And the result is a blank string.
I tried everything, like (string) casting, substr($key."", 35, -1) , and it does not work.
Does anyone have any suggestions?