Re: Show only first x characters of string

From: Date: Tue, 29 Apr 2003 13:53:04 +0000
Subject: Re: Show only first x characters of string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145650@lists.php.net to get a copy of this message
substr() mailing wrote:
Hi I am trying to find a function that only shows the first 20 characters of a string. Eg : $string = "A very long paragraph would be shown here" $dots = "..."; echo $string $dots; actually prints A very long paragrap... etc. Many thanks James


« previous php.general (#145650) next »