说明:通过(.)或(.=)进行字符串的拼接
//字符串连接符
$name = 'admin';
echo '您好!'.$name.'重蔚自留地';
echo '您好!.$name重蔚自留地';
echo '
';
//.=:链接后再赋值
$user = 'admin';
$user .= '888'; //相当于:$user = 'admin' . '888';
echo $user;
echo '
';
//随机数--给4个随机数
$num = rand(0,9);
$num .= rand(0,9);
$num .= rand(0,9);
$num .= rand(0,9);
echo $num;
?>
本文来自投稿,不代表重蔚自留地立场,如若转载,请注明出处https://www.cwhello.com/3998.html
如有侵犯您的合法权益请发邮件951076433@qq.com联系删除