SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow HELP changing space/%20 to -

    Hallo Sitepoint,

    thank you for viewing my post. I need help regarding on replacing or changin space/%20 to -.

    <a href="?do=detailpage&cat='.$tab[$i]['cat_id'].'&id='.$tab[$i]['posting_id'].'&title='.$tab[$i]['title'].'">';

    if i click the link, it will turn something like this
    lioney. sg /index.php?do=detailpage&cat=6&id=14&title=I%20need%20English%20-%20Japanese%20translator

    the cat = category
    id = posting ID
    title = post title

    is there anyway to change the space to something like - ?

    Please i need some help.

    thanks

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $tab[$i]['title'] = str_replace(" ""-"$tab[$i]['title']); 

  3. #3
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Dan,

    thank you. it's done.


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
  •