Converting text to Safe Tags |
[eluser]zeedy2k[/eluser]
Is there any fucntions that I can use that will allow me to create tags for use in URL's? for example. Game's & Application's would be converted to something like games_applications? Thanks Robert
[eluser]Pascal Kriete[/eluser]
There isn't a built in one that I'm aware of (the inflector helper will do spaces). It's not hard though. Code: $text = "whatever&$*()#U you want-in_#*(%Y# the *$(#&# url;";
[eluser]Pascal Kriete[/eluser]
Better yet: Code: // Do spaces as above
[eluser]Seppo[/eluser]
As a matter of fact there is a function in the URL helper to do this. url_title() Takes a string as input and creates a human-friendly URL string. This is useful if, for example, you have a blog in which you'd like to use the title of your entries in the URL. Example: $title = "What's wrong with CSS?"; Code: $url_title = url_title($title);
|
Welcome Guest, Not a member yet? Register Sign In |