Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php truncate string

echo substr('hello world', 0, 5); //hello
Comment

php truncate string

$string = (strlen($string) > 13) ? substr($string,0,10).'...' : $string;
Comment

PREVIOUS NEXT
Code Example
Php :: check if array has value php 
Php :: how to define variable as object in blade laravel 
Php :: yii2 sql query 
Php :: php move file 
Php :: laravel encrypt decrypt 
Php :: wordpress logout redirect to home 
Php :: php changr date format 
Php :: get last two numbers from int php 
Php :: laravel sum group by 
Php :: unset _post 
Php :: how to hide .php extension using .htaccess 
Php :: php implode as key value of object 
Php :: array merge php 
Php :: increase the number in php by a certain percentage 
Php :: how to create a new component in laravel 
Php :: string remove line breaks php 
Php :: is php still used 
Php :: php array to js 
Php :: redirect 301 wordpress 
Php :: displaying laravel error in below input field 
Php :: install phpunit on ubuntu 18.04 
Php :: How to get the current date in PHP? 
Php :: get message validator failed laravel 
Php :: php get content phpinfo without show 
Php :: php directory listing 
Php :: php check name 
Php :: wordpress get site url 
Php :: laravel composer 
Php :: laravel get header from request 
Php :: laravel 5.4 forelse 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =