Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,我需要在第一个数字和第二个数字之间加上点,我的结果是:
11我要怎么让他这样1.1?
11
1.1
if ( strlen($model->rate) == 2 ) { }
$model->rate = $model->rate[0] . '.' . $model->rate[1];
此外,您的 if 条件应如下所示(注意等号的数量):
if ( strlen($model->rate) == 2 )