我想在textarea中使用特殊文本作爲具有值的變量。PHP - 如何使用文本%從文本區域到變量
例如:
在文本區域的文本%Url%
等於http://example.com/
。
它更可能是這樣的:
如果在PHP中,它會像這樣:
$Url = 'http://example.com';
echo 'This is an example'.$Url.'of a website';
輸出HTML:This is an example http://example.com of a website
我想要做的是使textarea像上面的代碼一樣工作。
textarea的
%Url% = http://example.com/
<textarea name='test'>This is an example %Url% of a website</textarea>
所以當textarea的值被髮送到服務器,我想PHP讀取它:
This is an example http://example.com/ of a website
,或者$_POST['test']
(文字區域名稱爲測試)在submi後回顯那麼它會輸出:
This is an example http://example.com/ of a website
如何實現它?我看到一個應用程序能夠做到這一點!
沼澤標準「PHP 101」的代碼,你可以都颳起了自己:'這是一個例子的網站 –