Re: First 30 characters of a strong

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

 



On Sun, 2008-10-05 at 14:52 -0400, Ron Piggott wrote:
> How do I display the first 5 characters of a string?  
> 
> $string="abcdefghijklmnopqrstuvwxyz";
> 
> my desired output is 
> 
> abcde
> 
> 

substr($string, 0, 5);


Ash
www.ashleysheridan.co.uk


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux