Strip tags from output
-
I have a custom field called “link” which is filled with an url to an external website. I like to fill in this URL in a href-value of an a-element
It should look like this
<a href="https://mycustomfield.com">Click</a>
But it looks like this:
<a href="<div class="lcp-customfield">https://mycustomfield</div>">Click</a>
My template goes like this:
$lcp_display_output .= "<a href='$link'>"; $lcp_display_output .= "Click"; $lcp_display_output .= '</a>';
How can I get rid of the tags around my custom field in order to get a functioning link on my web page?
Thanks in advance for your help!
Zippo
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Strip tags from output’ is closed to new replies.