The strip_tags function removes HTML and PHP tags from a string.

    
    $text = "Hello world!";
    $textStripTags = strip_tags($text);

    echo $textStripTags;
    // Hello world