replacing ampersand with character code

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 23, 2008   (RSS)

Re: [Deborah] replacing ampersand with character code

By Dave - October 23, 2008

Hi Deborah,

With wysiwyg fields it should be encoded automatically. For all other fields you can use the php htmlspecialchars() function in your viewer page. You can read more about this function here: http://www.php.net/htmlspecialchars

Just add the code in red:

<?php echo htmlspecialchars($record['title']) ?>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] replacing ampersand with character code

By Deborah - October 23, 2008

Dave,

The code you supplied did the trick, and the link you provided to more info about the function was very informative.

Thanks for providing such excellent support... as you guys always do!

Deborah