Jump to content

parse error


andy_b_1502

Recommended Posts

Hi everyone.

 

Can someone help me fix this code:

 

<?PHP
include('db.php);
$query = "SELECT * FROM companies;
$result = mysql_query($query) ;
while ( $row = mysql_fetch_array($result)) {
echo $row['what_services'] . " - " . strlen($row['what_services']);
}
?>

 

on line 6 it has a parse error: Parse error: syntax error, unexpected T_STRING in /hermes/bosweb25a/b109/ipg.removalspacecom/services_001.php on line 6

Link to comment
https://forums.phpfreaks.com/topic/261805-parse-error/
Share on other sites

And the single-quote(s) above those...

 

You need to be using an editor with code highlighting and use <?php (lowercase) for your opening php tag (at least the forum highlighting doesn't see the <?PHP, perhaps your current editor doesn't either.)

Link to comment
https://forums.phpfreaks.com/topic/261805-parse-error/#findComment-1341543
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.