<?php // String convertable to htmlentities $str = '<a href="https://www.geeksforgeeks.org">GeeksforGeeks</a>'; // It will convert htmlentities and print them echo htmlentities( $str ); ?>