Skip to content

Instantly share code, notes, and snippets.

@mcaskill
mcaskill / Function.Strip-HTML.php
Last active January 4, 2022 10:38
PHP : Strip HTML and PHP tags from a string.
<?php
if (!function_exists('strip_html')) {
/**
* Strip HTML and PHP tags from a string.
*
* @param string $str The input string.
* @return string Returns the stripped string.
*/
function strip_html($str)