regex - How can I get digit after 0 with php -
i have number following format. 100034, 100345, 103456,
i want digit after 0 this. 34, 345, 3456
how can get?help me plz.
how using modulo maths:
$str = '103456'; $n = (int) $str % pow(10, strlen($str)-1); // 3456
Comments
Post a Comment