I want to convert these types of values, '3'
, '2.34'
, '0.234343'
, etc. to a number.
(我想将这些类型的值'3'
, '2.34'
, '0.234343'
等转换为数字。)
In JavaScript we can use Number()
, but is there any similar method available in PHP? (在JavaScript中,我们可以使用Number()
,但是PHP中有可用的类似方法吗?)
Input Output
'2' 2
'2.34' 2.34
'0.3454545' 0.3454545
ask by Sara translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…