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

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -