Re: Reducing Strings to a certain length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use the 'substr' function

$reduced_string = substr($str, 0, 60);

More info available at http://www.php.net/substr

Amit Arora
http://www.digitalamit.com

Cole Ashcraft wrote:
How would you reduce a string to a specified length? Say reduce 600 to
60 or abc to ab? Is there a PHP function for this? Will I have to write
my own code?

Cole



-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux