您好,我正在尝试检查值 mysql_fetch_assoc($query)
一个数字。但出现错误:
Parse error: syntax error, unexpected T_STRING, expecting '(' in /var/www/xmlexport/run/test.php on line 53
我正在使用:
while($values_query = mysql_fetch_assoc($query))
第 53 行是:
if is_numeric($values_query['row5']) { $testt = round(($values_query['row5']), 2); } else { $testt = 'hello'; }
最佳答案
试试这个:
if (is_numeric($values_query['row5'])) { $testt = round(($values_query['row5']), 2); } else { $testt = 'hello'; }
if条件没有括号
关于php - mysql_fetch_assoc 中的 is_numeric(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37808574/