Posts Tagged ‘special characters’


Special Characters in HTML with PHP’s htmlspecialchars() Function

Posted December 8th, 2009 by Ben in Content Management, Website Development

Introduction

Certain characters should not be used as plain text in HTML markup but should instead be represented by their respective HTML entities in order to preserve their meanings in web design. When writing HTML this is a straightforward process – you type the HTML entity rather than the special character. But what happens when you have some plain text containing these characters (out of a database, for example) that you need to display? PHP has a function that will take a string and convert special characters to their HTML entities for you.
(more…)


Subscribe
Get A Quote Get A Free Website Analysis
© 2009 RAM. All rights reserved. Built and Powered by WSI. | Sitemap
Web Design Huddersfield and Online Marketing Huddersfield as well as Leeds, Manchester, Sheffield & West Yorkshire

WSI Internet Consulting, The Media Centre, 7 Northumberland Street, Huddersfield, HD1 1RL
Registered in England No. 4968860, Bridge End House, Park Mount Avenue, Baildon, BD17 6DS