Last active
May 19, 2022 11:08
-
-
Save cp-sumi-k/50abfe74d60a81eb4e8c6f05a7f8d850 to your computer and use it in GitHub Desktop.
https://blog.canopas.com/php-useful-encoding-and-decoding-functions-you-need-to-know-210e523a065f - htmlentities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = "<a href='https://canopas.com'>Let's explore</a>"; | |
echo htmlentities($str); // in browser | |
error_log(htmlentities($str)); // in console | |
/* | |
output | |
In browser : <a href='https://canopas.com'>Let's explore</a> | |
In console : <a href='https://canopas.com'>Let's explore</a> | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment