1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: htmlspecialcharacters - hyphens?

Discussion in 'Web Design & Development' started by JiminSA, Jun 26, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    It would seem that this function doesn't handle hyphens. Can anyone suggest a better methodology to replace special characters with the &.... equivalents? ( even htmlentities doesn't cope )
     
  2. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    Why would you want to replace hyphens? Do you dislike horizontal punctuation for some reason? :rolleyes:

    If that pesky little varmint displeases you that much you could always try str_replace();

    Danny
     
  3. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    I don't want to replace them - I want to render them! I get รข€“ if not specified as –:)
    Thanks mate, I'll "replace" them using str replace() ...
     
  4. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    I feel I must explain exactly what's happening...

    I have a .dat file which holds a very small database and when I 'read' it using @unserialise I get some weird hieroglyphics which I want to replace with the correct characters.

    Mayhap, I should be asking why the @unserialize'd data is 'corrupt'? - Any ideas?:confused:
     
  5. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,384
    You Hyphenist! How dare you! :D

    Sorry guys, just wanted to acknowledge allnodcoms humor, moving along now...:)
     
  6. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    Don't be sorry, CK - Danny brightens my day with his sometimes cutting sense of fun!:cool:
     
  7. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    Thank you, thank you... I'll be here all week!

    Danny
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1058620