php - Echo statement rendering html code in output
160
This is such a basic question that I feel embarrassed asking it. Whenever I echo html tags, instead of rendering the tag, it just displays in the echo output. I have tried single and double quotes, but still no luck. What am I doing wrong here? Thanks
<a href="javascript:void(0)" title="<?php echo "Please select your boxes from the list. You can select a max of 20 boxes per submission.<br />You can select multiple boxes by holding the left ctrl on your keyboard and making your selection"; ?>">Help</a>
ff rendered output:
title="Please select your boxes from the list. You can select a max of 20 boxes per submission.<br />You can select multiple boxes by holding the left ctrl on your keyboard and making your selection"
Answer
Solution:
Use this instead for your
<a/>
tag:Or alternatively:
Answer
Solution:
HTML code can not be put inside a title tag as browser will not render titles as anything else than a pure text string.