Php değeri ile href bağlantı

3 Cevap php

hi i am having a link like below

        <a href="#" onclick="window.open('http://www.twitter.com/home?status=Reading+Facebook share, Yahoo Buzz and Tweet this buttons for Blogger blogs+http://www.didiknow.com');">Tweet this</a>

i want to insert a php variable value inside for the status thing like

          <a href="#" onclick="window.open('http://www.twitter.com/home?status=$markme_ddesc');">Tweet this</a>

bunu nasıl? Bana yardım edin lütfen ..

3 Cevap

sadece orada onu yankı?

<?= $markme_ddesc ?>

Örneğin, çeşitli yollar vardır:

<a href="#" onclick="window.open('http://www.twitter.com/home?status=<?=$markme_ddesc?>">Tweet this</a>

veya

<a href="#" onclick="window.open('http://www.twitter.com/home?status=<?php print($markme_ddesc);?>">Tweet this</a>

veya (in case you are within the tags)

print("<a href=\"#\" onclick=\"window.open('http://www.twitter.com/home?status=$markme_ddesc\">Tweet this</a>");

Gibi kullanabiliriz

<a href="#" onclick="window.open('http://www.twitter.com/home?status=<?=$markme_ddesc?>">Tweet this</a>

note: status=<?=$markme_ddesc?>