Chrome Extension

Convert HTML code to plain text in PHP

<?php
    $html_code = '<p>Hello world</p>'
    echo strip_tags($html_code);
?>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

You can use strip_tags() function to convert HTML code to plain text in PHP. This will remove the basic HTML tags from the string and will return plain text string.

Was this helpful?
0 Comments
Join Devsheet Ask a Question