Re: [PHP/MySQL] News System
what do you want it for?
supposing you are trying to create some kind of seo friendly permalink, you should simply store both..
and it's
PHP Code:
str_replace(" ", "_", $string);
or regex..
you should also remove(replace with their ascii counterpart) foreign signs and do strtolower..
Re: [PHP/MySQL] News System
Well, I'm doing it for my news system, I don't think that it's necessary to replace spaces with underscores, I guess it's a kind of OCD thing :')
Many thanks for the help :)
Re: [PHP/MySQL] News System
Quote:
Originally Posted by
MattehCarter
Well, I'm doing it for my news system, I don't think that it's necessary to replace spaces with underscores, I guess it's a kind of OCD thing :')
Many thanks for the help :)
I would remove the spaces and replace with underscores.
If you copy and paste a link say for example this into MSN:
Code:
http://www.site.com/news/php mysql news system
... it will break off the hyper link after "http://www.site.com/news/php", whereas if you replace spaces with underscores, it shouldn't break off the hyperlink.