Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to echo tags is resulting in a text string

Featured Replies

I'm trying to echo a an href tag along with some images and the result I'm getting is simply a string of text. I'm not sure of how or why the result isn't being interpreted properly. Leaving out the FM API and declaration portions, here's what DOES work:

[center]

        

            '>
(closing php tag isn't showing up in the code here on FMForums)



Here's the code I would like to have so I can simply copy the above into one field in FM...



<?php echo $imageStringA; ?> [/center]

But again, this results in the string being echoed back. I've tried single-quotes, escaped double-quotes, the substitute function, etc. but no luck.

Any advice would be a great help.

Thanks.

If I understand your problem correctly, the first thing that comes to mind is that htmlentities() is getting run on the string at some point in the process.


$str = "A 'quote' is [b]bold[/b]";

echo htmlentities($str);

/* Outputs: A 'quote' is <b>bold</b>*/



check the HTML source (View->Page Source in firefox ) to confirm.

oh yeah, if that is the case and removing it will break something else you can always use html_entity_decode() to reverse it

Edited by Guest

  • Author

Thanks Baloo,

I've seen the html_entity_decode() used a lot but never bothered to look it up.

That did the trick.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.