SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Hiding from the world
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    remove %20 in dynamic url

    hi,
    iam currently using $title in my url to call the correct page from my database, the trouble is when the title is a couple of words i get the lovely %20 in the url which makes it look highly confusing to the average user.

    My question is thus -

    Should i add a " - " between the words in my database and then remove them on the page when i echo the title at the top of my text

    or

    Put the "-" in my hyperlinks and then remove them to match the query on the page.

    hopefully that makes some sort of sense. Should i use eregreplace ?
    your help will be most appreciated. thanks
    If i am a product of your imagination you should try harder!

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Hiding from the world
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    cool thanks i'll check it out, although this could melt my brain as iam already exploding stuff to clean up my urls. Thanks
    If i am a product of your imagination you should try harder!

  4. #4
    SitePoint Member
    Join Date
    Jun 2006
    Location
    Zagreb, Croatia
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have one extra field in the database witch stores the URL...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •