Answers for "limit string syntax"

PHP
0

limit string syntax

<?php
      $string = "How to Limit Characters to Display in a String using PHP";
      echo substr($string, 0, 30);
?>
Posted by: Guest on December-24-2021
0

limit string syntax

<?php
       $string = "How to Limit Characters to Display in a String using PHP";
       echo substr_replace($string, '...', 25);
?>
Posted by: Guest on December-24-2021

Browse Popular Code Answers by Language