Tag: PHP


Laravel: The PHP Framework For Web Artisans

Introduction to Laravel Laravel is a renowned PHP web application framework known for its expressive and elegant syntax. It provides a structured foundation for developers, allowing them to focus on building incredible applications without getting bogged down in the minutiae. Laravel aims to deliver an exceptional developer experience, boasting powerful features like dependency injection, an expressive database abstraction layer, queues,…

Read More »

PHP function to cut string into a specific length

PHP function to cut string into a specific length. Very useful for “Read More” links. function wCut($str, $maxLength = 40) { $strToCount = html_entity_decode($str); if (strlen($strToCount) <= $maxLength) { return $str; } $s2 = substr($strToCount, 0, $maxLength – 3); $s2 .= “…”; return htmlentities($s2); } $str = ‘Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nunc risus, euismod ac,…

Read More »