HTML PHP字符串特殊字符转义

HTML PHP字符串特殊字符转义,php,escaping,Php,Escaping,只是想知道是否有可能使用PHP编写链接按钮,字符串中有这么多特殊字符 $link='index.php?topic=transactions&content=transaction_adjustment&tx_number='.$tx_number; echo '<button type="button" onclick="window.location.href="'.$link.'"">Adjust</button>'; $link='ind

只是想知道是否有可能使用PHP编写链接按钮,字符串中有这么多特殊字符

  $link='index.php?topic=transactions&content=transaction_adjustment&tx_number='.$tx_number;
  echo '<button type="button" onclick="window.location.href="'.$link.'"">Adjust</button>';
$link='index.php?topic=transactions&content=transaction\u adjustment&tx\u number='。$tx\u number;
回声“调整”;
尝试以下操作:

 $link='index.php?topic=transactions&content=transaction_adjustment&tx_number='.$tx_number;
 echo '<button type="button" onclick="window.location.href=\''.$link.'\'">Adjust</button>';
$link='index.php?topic=transactions&content=transaction\u adjustment&tx\u number='。$tx\u number;
回声“调整”;
没有什么特别的,但是++不应该被打折。你只需要在这里有一个额外的
。$link.”“>