プロが教える店舗&オフィスのセキュリティ対策術

Parse error: syntax error, unexpected ')', expecting '}' in C:\xampp\htdocs\YPHPSample\9\Sample9-4.php on line 27
以上がエラーの内容です。
以下がプログラムです。
 よろしくお願いします。
<!DOCTYPE html>
<html>
<head>
<title> 文字列検索</title>
</head>
<body>

<?php

$ptr = array("Apple", "GoodBye", "Thankyou");
$str = array("Hello", "GoodBye", "Thankyou");

?>

<table border="2">
<tr bgcolor="#AAAAAA">
<th>パターン</th>
<th>文字列</th>
<th>マッチ</th>
</tr>

<?php

foreach($ptr as $valueptr){
foreach($str as $valuestr){

print "<tr><td>{$valueptr}</td><td>{$valuestr)</td>";

$mt = preg_match("/". $valueptr . "/", $valuestr)
? "〇": "×";
print "<td>{$mt}</td></tr>\n";

}
}

?>

</table>

</body>
</html>

A 回答 (1件)

27行目にでてくる二回目の$valuestrが「}」で閉じずに「)」で閉じてますね

    • good
    • 1
この回答へのお礼

ご回答くださいましてありがとうございました。
助かりました。

お礼日時:2018/03/13 17:40

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!