Search
 
SCRIPT & CODE EXAMPLE
 

PHP

show dot dot after some words php

The PHP way of doing this is simple:

$out = strlen($in) > 50 ? substr($in,0,50)."..." : $in;
But you can achieve a much nicer effect with this CSS:

.ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
Now, assuming the element has a fixed width, the browser will automatically break off and add the ... for you.
Comment

PREVIOUS NEXT
Code Example
Php :: how to add in massive php 
Php :: GZIP COMPRESSION With PHP 
Php :: how to store api response to avariable in phpp 
Php :: array filter vs array search php 
Php :: laravel where has relation 
Php :: How to add logo in FPDF PHP 
Php :: if request method post php 
Php :: php season calculation 
Php :: php iife 
Php :: changing the autoload.php for algolia search 
Php :: laravel filemanger choose multiple images 
Php :: event handler with worker laravel 
Php :: collection methods laravel 
Php :: laravel validate string 
Php :: how to hide .php in url 
Php :: how to get the ip address of the client in php 
Php :: simple php round example 
Php :: WP Migrate Lite 
Php :: loop through object php 
Php :: php get final redirect url 
Php :: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.3.27 Server at localhost Port 80 
Java :: when is the first day of spring 
Java :: jenkins decrypt password script console 
Java :: minecraft bedrock save location 
Java :: onclick button in java android 
Java :: simpleListView = (ListView) findViewById(R.id.simpleListView) explain 
Java :: How to solve towers of hanoi problem? 
Java :: android studio centering textview in relativelayout 
Java :: array to map java1 
Java :: join array java 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =