Join WhatsApp ChannelJoin Now

How to Remove HTML Tags String in Laravel Example

Hi Dev,

Today, i we will show you How to Remove HTML Tags String in Laravel Example. This article will give you simple example of How to Remove HTML Tags String in Laravel Example. you will How to Remove HTML Tags String in Laravel Example. In this article, we will implement a How to Remove HTML Tags String in Laravel Example.

So, let’s follow few steps to create example of How to Remove HTML Tags String in Laravel Example

Example 1

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
     
class DemoController extends Controller
{
    /**
     * Write code on Method
     *
     * @return response()
     */
    public function index(Request $request)
    {
        $tagsString = "Google <h1>Nice</h1>, Nice to <p>meet</p> you.";
  
        return view("demo", compact("tagsString"));
    }
}

Example 2

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
</head>
<body>
  
    <h1>How to Remove HTML Tags String in Laravel Example</h1>
  
    {{ strip_tags($tagsString) }}
  
</body>
</html>

I hope it will assist you…

Recommended Posts