How to get the first two numbers in an integral? How to get the first two numbers in an integral? php php

How to get the first two numbers in an integral?


PHP:

$num = 123456;echo substr($num, 0, 2);

JavaScript:

alert((123456).toString().substr(0, 2));


JavaScript:

(123456).toString().substr(0,2);

PHP:

substr(123456, 0, 2);


$result = substr("123456", 0, 2);