0

I am working on laravel, where I am passing array of objects like this to my view-

enter image description here

Now problem is when I am displaying the data it's showing the html part as text content,which is problematic to generate html.is there any built in php function that converts to HTML?

Coming in this way -

enter image description here

Any idea to solve is appreciated.

  • 1
    Possible duplicate of [What is the difference between {{ }} and {!! !!} in laravel blade files?](http://stackoverflow.com/questions/35030977/what-is-the-difference-between-and-in-laravel-blade-files) – Narendrasingh Sisodia Jun 06 '16 at 07:05
  • Possible duplicate of [Laravel 5: Display HTML with Blade](http://stackoverflow.com/questions/29253979/laravel-5-display-html-with-blade) – Ravi Hirani Jun 06 '16 at 07:09

1 Answers1

9

If you are using blade you should do it this way:

{!! $htmlString !!}

It will render raw html.

Francisco Carmona
  • 1,681
  • 1
  • 9
  • 9