テキストエリアフォームを使用して、このスクリプトを変数として以下に保存したいのですが、変数を実行してエコーすると、ブラウザはコードを解釈します。私はこれを望んでいません。スクリプトを変数に「そのまま」保存して、その変数を使用してさらに操作できるようにしたいだけです。PHPでテキストエリアフォームを使用してこれを達成する方法はありますか?
<a href="https://rads.stackoverflow.com/amzn/click/com/B008EYEYBA" rel="nofollow noreferrer"><img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&ASIN=B008EYEYBA&Format=_SL110_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mytwitterpage-20" ></a><img src="http://www.assoc-amazon.com/e/ir?t=mytwitterpage-20&l=as2&o=1&a=B008EYEYBA" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
ところで、以下は、ユーザーが上記のスクリプトをテキスト領域に配置したときに必要な正確な php 変数です。
$str = "<a href="https://rads.stackoverflow.com/amzn/click/com/B008EYEYBA" rel="nofollow noreferrer"><img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&ASIN=B008EYEYBA&Format=_SL110_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mytwitterpage-20" ></a><img src="http://www.assoc-amazon.com/e/ir?t=mytwitterpage-20&l=as2&o=1&a=B008EYEYBA" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />";
どんな助けでも大歓迎です。ありがとう