I was working on PHP project that require to get a text from MySQL and display only 50 character. Thus I used php substr function to truncate a text to first 50 character. $text="quick brown fox jumps over the lazy dog. quick brown fox jumps over the lazy dog."; echo substr($text, 0, 50); Output Of above code […]
↧