0

Hello i'm trying to check is a value of mysql_fetch_assoc($query) a numeric. But getting an error:

Parse error: syntax error, unexpected T_STRING, expecting '(' in /var/www/xmlexport/run/test.php on line 53

Im using:

while($values_query = mysql_fetch_assoc($query))

Line 53 is:

    if is_numeric($values_query['row5']) { $testt = round(($values_query['row5']), 2); } else { $testt = 'hello'; }
Hamid Rouhani
  • 2,309
  • 2
  • 31
  • 45
El box
  • 3
  • 1

1 Answers1

0

Try this:

 if (is_numeric($values_query['row5'])) { $testt = round(($values_query['row5']), 2); } else { $testt = 'hello'; }

the if condition have no bracket

MarBer
  • 535
  • 1
  • 5
  • 22