need help on substr function on PHP |
[eluser]ebot[/eluser]
hello i will love any one to help me out on how to use the substr function on PHP, i will like to use it to limit the number of characters displayed. i don't know if anyone knows where i can get more informations on this thanks for any help
[eluser]Joe_Archer[/eluser]
Code: substr(string,starting character,[ending character]) ending character is optional. first character is 0 last character is -1 so to get the first 4 characters of 'Hello' you would do Code: substr('Hello',0,3) if you just want to limit the number of characters displayed in a view, i suggest using Codeigniter's Text Helper which has both word_limiter() and character_limiter() functions. http://ellislab.com/codeigniter/user-gui...elper.html
[eluser]ebot[/eluser]
Thanks everyone for all help i am greatful you know. God keep everyone, |
Welcome Guest, Not a member yet? Register Sign In |