Forum Moderators: coopster

Message Too Old, No Replies

PHP parse error, unexpected T CONSTANT ENCAPSED STRING, expecting ')'

PHP Error Message

         

Stevens579

2:06 am on Jan 23, 2008 (gmt 0)

10+ Year Member



Help, I'm getting the following error message when I edit my PHP file.

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /hsphere/local/home/kaymedia/example.com/OrderSheet/global.php on line 79

The body of the PHP file is below.

<?
function dbConnect() {
static $doneDBConnect;
if (!$doneDBConnect) {
//$link=mysql_connect("localhost", "user, "pass") or die("Could not connect: " . mysql_error());
//$link=mysql_connect("mysql.example.com", "user", "pass") or die("Could not connect: " . mysql_error());
$link=mysql_connect("mysql16.example.com", "user", "pass") or die("Could not connect: " . mysql_error());
//mysql_select_db("_ootb_oob");
mysql_select_db("kaymedi_oob");
return $link;
}
$doneDBConnect=TRUE;
}

function printHTMLHeader() {
print <<< EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Order Sheet</title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
EOF;
}

function printHTMLFooter() {
print "</body>\n";
print "</html>";
}

function devPrint($msg) {
global $dev;
if ($dev) printf("\n<div class=\"dev\">\n%s\n</div>\n", $msg);
}
function devPrint_r(&$var) {
global $dev;
if ($dev) devPrint("<pre>".var_export($var, 1)."</pre>");
}
function devRedir($loc) {
global $dev;
if ($dev) devPrint("<hr>Dev redir to: <a href=\"$loc\">$loc</a>");
else header("Location: $loc");
exit;
}

dbConnect();
$dev=false;
if ($dev) { error_reporting (E_ALL ^ E_NOTICE); } else { error_reporting(0); }

$sheetItems = array("itemname1", "itemname1_bold", "itemname2", "itemname2_bold",
"itemnum1", "itemnum1_bold", "itemnum2", "itemnum2_bold",
"qty1", "qty1_bold", "qty2", "qty2_bold",
"price1", "price1_bold", "price2", "price2_bold",
"note", "descr", "t1", "t2", "t3", "t4", "deleted");

$sheetTypes = array(
/*"promohut" => "Promohut",
"promohut_fairmont" => "Promohut - Fairmont Funding",
"oob" => "Out of the Box",*/
"wynn" => "OOB - Wynn",
"redrock" => "OOB - Red Rock",
/*"fresh" => "Fresh NYC",
"fresh_wynn" => "Fresh NYC - Wynn",
"fresh_redrock" => "Fresh NYC - Red Rock",
"fresh_fairmont" => "Fresh NYC - Fairmont Funding",*/
"fontainebleau" => "Fountaine Bleau",
"venetian" => "Venetian",
"theplaza" => "The Plaza",
"pechanga" => "Pechanga",
"luxor" => "Luxor Las Vegas",
"borgata" => "Borgata",
"mandalaybay" => "Mandalay Bay",
"palazzo" => "Palazzo",
"southernhighlands" => "Southern Highlands",
"theplaza" => "The Plaza",
"mohegansun" => "Mohegan Sun"
"TheWaterClub" => "The Water Club")
;

?>

Please help.

Thanks

[edited by: jatar_k at 2:34 am (utc) on Jan. 23, 2008]

[edited by: eelixduppy at 4:51 am (utc) on Jan. 23, 2008]
[edit reason] removed user/pass [/edit]

formasfunction

6:42 am on Jan 23, 2008 (gmt 0)

10+ Year Member



Looks to me like you're missing a comma after the second to last entry in the array $sheetTypes. There should be one after

"mohegansun" => "Mohegan Sun"