Use htmlspecialchars.
<?php
echo htmlspecialchars("abc & < >");
?>
More Related Contents:
- How to safely output HTML from a PHP program?
- Syntax error unexpected '<' [duplicate]
- Pass PHP variable value into HTML label [closed]
- PHP: What’s the speed difference “template” vs “quote”? [duplicate]
- Turn Plain Text URLs into Active Links using PHP [closed]
- I am new to php ,please tell me ,button click event should add new input tag to existing form through php [closed]
- Needle in a Haystack for Php [closed]
- How print in Jquery / Datatables [closed]
- My code is not responding as i want it to be? [closed]
- Divide php echo rows into 3 columns
- How to insert images into a database using PHP [closed]
- (PHP) Warning: file_get_contents() [function.file-get-contents]: couldn’t resolve host name
- Multiple inputs with same name through POST in php
- HTML/PHP – Form – Input as array
- Truncate text containing HTML, ignoring tags
- PHP Undefined Index [duplicate]
- UTF-8 encoded html pages show � (questions marks) instead of characters
- How do I see which checkbox is checked?
- How do I pass data between pages in PHP?
- How to implement Content-Disposition: attachment?
- prevent direct url access to php file
- How to echo in PHP, HTML tags
- Sending HTML Code Through JSON
- How to post multiple as array in PHP?
- how to embed html files in php code?
- HTML 5 multi file upload with PHP
- HTML form PHP post to self to validate or submit to new page
- multiple buttons on a form
- mysql_fetch_array skipping first row
- displaying a message after redirecting the user to another web page [duplicate]