wordpress:php中的锚标记回显<a> tag without URl in href

时间:2015-06-24 21:31:32

标签: php html wordpress

may someone explain me why this code:

echo '<a href="'.$woocommerce->cart->get_cart_url().'" id="header_cart"><i class="'. $show_cart .'"></i><span>'. $woocommerce->cart->cart_contents_count .'</span></a>';

echoes this in HTML:

<a id="header_cart" href=""><i class="icon-basket"></i><span>1</span></a>

i mean, why the href attribute is empty but if i delete the id attribute it works normally?

0 个答案:

没有答案