Functions Built-in PHP
1. strip_tags() Function
The Data from Text Editor- SAVED WITH TAGS - into Database Table
To display data on page without tags - strip_tags() Function is used
Ex: {{strip_tags($blog->body)}}
2. date() Function
To Display Date from Database Table in desired Format
{{date("l, F d, Y",strtotime($post->created_at))}}
2. substr() Function
To Display String setting WORD LIMIT from Database Table in desired Format
{{substr(strip_tags($post->body), 0, 150)}}
Comments
Post a Comment