Re: Truncating
| From: | Andrew | Date: | Thu, 24 Aug 2000 04:44:33 +0000 |
| Subject: | Re: Truncating | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13299@lists.php.net to get a copy of this message | ||
Sorry about the many e-mails, but I found this example that trucates a
string in a Perl script: $TruncatedWord =~ s/(\S{50})/$1 /isg; is their any
chance I can convert this to PHP using preg_replace? If so, how?
Andrew
digi-FX
-------------------------------
http://www.digi-FX.net
----- Original Message -----
From: Andrew <fisherres@msn.com>
To: PHP General <php-general@lists.php.net>
Sent: Wednesday, August 23, 2000 7:12 PM
Subject: [PHP] Truncating
> Hello,
>
> I have a string that I'd like to truncate to a specified amount of
> characters long. This string will then be printed to the browser. How
can
> I truncate the string, and then convert all whitespaces to ?
>
> Thanks!
>
> Andrew
> digi-FX
> -------------------------------
> http://www.digi-FX.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>