Nov
27
2013

Clean sanitized database contents on output

/**
 * Function to clean data for nice output
 *
 * @access public
 * @param string
 * @return string
 */
function clean( $text )
{
    return stripslashes( html_entity_decode( nl2br( $text ) ) );
}

Leave a comment