CodeIgniter Forums
Something simple - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Something simple (/showthread.php?tid=41771)



Something simple - El Forum - 05-16-2011

[eluser]Miguel Diaz[/eluser]
Hi I would like to know is there es a way to put the nl2br in a row that already have the character_limiter helper let me put you an example.

This is a foreach row that I have

Code:
<?= character_limiter($rowNoticias->articuloDescripcion,500);?>

is there a way to put the nl2br in that row

Thanks in advance


Something simple - El Forum - 05-17-2011

[eluser]toopay[/eluser]
Code:
<?php echo nl2br(character_limiter($rowNoticias->articuloDescripcion,500)); ?>



Something simple - El Forum - 05-17-2011

[eluser]Miguel Diaz[/eluser]
Hi thanks for your Reply but I already tried that way and it is not working if I use this

Code:
<?php echo nl2br($rowNoticias->articuloDescripcion); ?>

work perfect only with the break spaces if I use this one

<?php echo character_limiter($rowNoticias->articuloDescripcion,500);?>

works perfect the character limiter but if I use them together the nl2br doesnt work any idea why?

I would appreciate all help thanks.


Something simple - El Forum - 05-17-2011

[eluser]Miguel Diaz[/eluser]
Hi thanks for your Reply but I already tried that way and it is not working if I use this

Code:
<?php echo nl2br($rowNoticias->articuloDescripcion); ?>

work perfect only with the break spaces if I use this one

Code:
<?php echo character_limiter($rowNoticias->articuloDescripcion,500);?>

works perfect the character limiter but if I use them together the nl2br doesnt work any idea why?

I would appreciate all help thanks.


Something simple - El Forum - 05-17-2011

[eluser]Miguel Diaz[/eluser]
Thanks for you help already fixed the result that works is this one.

Code:
<?= character_limiter(nl2br($rowNoticias->articuloDescripcion),500); ?>

I hope helps for someone else too