Hitman
01-07-2010, 09:25 PM
Hi,
I have a table with 20,000 odd rows. Every row has a 'title', such as "hello there" or "my name is bob", as an example. What I want to do is to grab these titles, put a dash ( - ) between the spaces and then insert these titles with dashes into the table under 'dashed'.
So for example, I have these under title:
hello there mate
how are you
its cool yeah
fun fun fun
food tastes good
lets get some cola
good idea mate
And then the PHP script does what I said above and turns them into...
hello-there-mate
how-are-you
its-cool-yeah
fun-fun-fun
food-tastes-good
lets-get-some-cola
good-idea-mate
I'm not great at PHP but I imagine explode would be used? Any help?
Thanks!
I have a table with 20,000 odd rows. Every row has a 'title', such as "hello there" or "my name is bob", as an example. What I want to do is to grab these titles, put a dash ( - ) between the spaces and then insert these titles with dashes into the table under 'dashed'.
So for example, I have these under title:
hello there mate
how are you
its cool yeah
fun fun fun
food tastes good
lets get some cola
good idea mate
And then the PHP script does what I said above and turns them into...
hello-there-mate
how-are-you
its-cool-yeah
fun-fun-fun
food-tastes-good
lets-get-some-cola
good-idea-mate
I'm not great at PHP but I imagine explode would be used? Any help?
Thanks!