How can i trim text ? |
[eluser]margsot[/eluser]
I would like to trim text of one field called description to 100 characters. I tried to use this php code in my view file but doesnt work. Code: $max_length = 100;
[eluser]Syllean[/eluser]
The code works fine for me, are you sure that you passed $s into your view correctly? You really shouldn't be dealing with this type of logic in your views anyway, it's better to process it in your controller.
[eluser]anis2505[/eluser]
Take a look at the Text helper http://ellislab.com/codeigniter/user-gui...elper.html
|
Welcome Guest, Not a member yet? Register Sign In |