Two numbers are removed and set the number of digits taken

zhaozj2021-02-16  55

Two numbers, and set the number of digits of the decimal number Function Wxchu ($ LEFT, $ RIGHT, $ Num = 0) {

IF ($ right) {

$ ping = $ ip / $ right;

IF ($ NUM) {$ TEMP = FLOOR ($ ping);

Else {$ Temp = Substr ($ ping, 0, strpos ($ ping, ".") $ NUM 1);

} else {$ TEMP = 0;}

Return $ TEMP;

}

$ LEFT is the number of bits that $ RIGHT for the divisted $ NUM to take a small number, if not set, no decimal

转载请注明原文地址:https://www.9cbs.com/read-21357.html

New Post(0)