Hi everyone.

I'm trying to develop a little blog by my self.

and I'm gonna write in it as you guess but I want to give link, show picture, show video and also I want to make bold some letters.

Im gonna do video and bold replace with bbcode. thats fine but the thing is for link and picture i dont want to use any bbcode or something else

I want to be able to put a link as it is and I want php to replace it to a html link.

for example

<textarea>www.daniweb.com or http://www.site.com or http://site.com/show?p=2</textarea>

i send this to php, then php will insert this to mysql database

when i want to show this this need to be a link. people can click. so if users want to edit this they will be able to edit just the link.

how can i do this?

thanks

Study regular expressions. You can achieve your goal with the preg_replace() function which can find well-formed links and replace them with the appropriate HTML code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.