PHP substr right extract not working, returns nothing
01:03 20 Apr 2026
$key = strval($key);  
$key = trim($key);  

$year = substr($key, 0, 4);  
$week = substr($key, -2);

$key = 202602

$year = 2026

$week = "" // am after 02

Have no idea why this isn't working. probably something simple

php substr