/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //Storing a long string in a variable. $string = "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout."; //Display the string in it's original format. echo $string; //Get the lenght of the string. echo "<br/>"; //Method to chunk and replace a long string with some characters if you have space issues. if($str_length > 25) { //displayig the replaced string. } ?>
Comments
