0
我正在使用Wordpress插件,它向用戶發送通知電子郵件。在這樣的電子郵件中,我知道要嵌入一個ahref鏈接,它將某些變量作爲查詢參數傳遞。如何正確地將變量追加到鏈接作爲查詢?
目前我使用兩個變量在我的插件:
$email (the email address of the user)
$scheduler->post (the name of the post, from which a user has activated the notification plugin)
我現在想創建一個AHREF鏈接,追加兩個變量的URL,這樣我就可以在表單的用戶訪問他們正在引導到點擊鏈接時。
的目的是創造這樣的URL:
www.website.com/[email protected]&postname=example
我怎樣才能做到這一點?該網址應該如何顯示?
是否這樣?
<a href="http://www.example.com/?email=$email&postname=$scheduler->post">Visit this link</a>
感謝您的幫助。
亞歷山大
'urlencode()'做了詭計。謝謝! – Alex 2014-10-14 11:34:43