Does anyone here know how to extract url on textarea using CI? |
[eluser]coderedmax[/eluser]
Like title said anyone here knows or have a function how to detect url on text area and convert it to anchor tag? example : user input this on textarea Code: I really love codeigniter visit http://codeigniter.com then when need to input on database must be converted to Code: I really love codeigniter visit <a href="http://codeigniter.com" rel="nofollow">http://codeigniter.com</a> like that! Anyone knows? thank you.
[eluser]bubbafoley[/eluser]
use auto_link() in the url helper Code: echo auto_link('I really love codeigniter visit http://codeigniter.com'); http://ellislab.com/codeigniter/user-gui...elper.html
[eluser]coderedmax[/eluser]
@bubbafoley thanks! I didn't know CI have that features. :vampire: anyway I got also alternative solution: Code: $content = $this->input->post('discussion_content', TRUE); almost same but yours is easier. =) thanks again! |
Welcome Guest, Not a member yet? Register Sign In |