PHP - Unsyntax错误,意外'回声' (T_ECHO)在第58行

时间:2016-04-04 04:15:47

标签: php

  else if (isset($id) && isset($street_address) && isset($price)  ){
  echo '<p>Are you sure you want to delete the following product?</p>';
  echo '<p><strong>Street Address: </strong>' . $street_address '<br/><strong>Price: </strong>' . $price .;
  //  '<br /><strong>Price: </strong>' . $pPrice . '</p>';
   echo '<form method="post" action="removehome.php">'; <-- (line 58)

我尝试在上面的行中添加一个结尾分号,但最终得到一个&#34;意外&#34 ;;&#34;错误。我该如何解决?

1 个答案:

答案 0 :(得分:0)

问题出在</strong>' . $price .;。您在.之后使用了额外的$price

else if(isset($id) && isset($street_address) && isset($price)){
  echo '<p>Are you sure you want to delete the following product?</p>';
  echo '<p><strong>Street Address: </strong>'.$street_address.'<br/><strong>Price: </strong>'.$price;  
  echo '<form method="post" action="removehome.php">';