...

View Full Version : Function string to hyperlink problem



Trki
10-19-2012, 11:23 PM
Hi i have some function to convert spaces to one space or 3 break lines to just one break line but i am having trouble with this: i found it in database and it does problem for me ...

http://someurl/400-za-ucasti-svetovych-pros-5030/

stream pro dlouhé večery :)

THIS SYMBOL I CANT PUT HERE BECAUSE IT DELETE IT so here it is with spaces: & # 1 0 ;

AND WHAT I WANT TO DO ... IS DELETE THIS...
what means line break created with shift + enter... any ideas please? :P Or i can delete them before inserting to database or whatever i just want to know how to solve this problem with shift + enter line :P THX

Trki
10-20-2012, 09:32 PM
hm... any ideas how to convert line feed (shift+enter) to normal line break (enter) ? :P

bjarneo
10-20-2012, 09:51 PM
I actually don't understand what you need?

Anyways if you use shift+enter you get \n or \r\n. Can't remember right now.

So if you want to replace let's say \n with <br /> you do it like this:



$str = "Hello \n World";
$str = str_replace('\n', '<br />', $str);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum