$r=Db::singleSqlRow($s);$content="userName=$r['userName']";
$r是个数组,我这样下出错了,我知道把$r['userName']先定义一个变量就可以了,能否把$r['userName']自动当成变量处理
回复讨论(解决方案)
$content="userName={$r['userName']}";
对于易引起歧义的应当用{}括起来。
0
0
$r=Db::singleSqlRow($s);$content="userName=$r['userName']";
$content="userName={$r['userName']}";
对于易引起歧义的应当用{}括起来。
相关文章
php分割文本保留数字段_php分割后筛选is_numeric段【步骤】
PHP中mktime()函数参数类型错误的解决方案
PHP 中 mktime() 函数调用错误:参数类型不匹配的修复指南
PHP 中 mktime() 函数因参数类型严格校验导致的致命错误详解
php判断拼接后字符串长度_php连接字符串长度计算【步骤】
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号