Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

Solved: htmlspecialcharacters - hyphens?


(!)

JiminSA's Avatar
JiminSA   (Jim) JiminSA is offline JiminSA has a Profile Picture
Computer Specs
Member with 1,584 posts.
THREAD STARTER
 
Join Date: Dec 2011
Location: Johannesburg South Africa
Experience: Intermediate
26-Jun-2012, 09:42 AM #1
Solved: htmlspecialcharacters - hyphens?
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 )
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
26-Jun-2012, 10:40 AM #2
Wink I've met my first "Hyphenist"!
Why would you want to replace hyphens? Do you dislike horizontal punctuation for some reason?

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

Danny
JiminSA's Avatar
JiminSA   (Jim) JiminSA is offline JiminSA has a Profile Picture
Computer Specs
Member with 1,584 posts.
THREAD STARTER
 
Join Date: Dec 2011
Location: Johannesburg South Africa
Experience: Intermediate
26-Jun-2012, 11:19 AM #3
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() ...

Last edited by JiminSA; 26-Jun-2012 at 11:44 AM.. Reason: correct &name
JiminSA's Avatar
JiminSA   (Jim) JiminSA is offline JiminSA has a Profile Picture
Computer Specs
Member with 1,584 posts.
THREAD STARTER
 
Join Date: Dec 2011
Location: Johannesburg South Africa
Experience: Intermediate
26-Jun-2012, 11:54 AM #4
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?
ckphilli's Avatar
ckphilli   (Chris) ckphilli is offline
Member with 4,225 posts.
 
Join Date: Apr 2006
Location: Down South
Experience: Intermediate
26-Jun-2012, 12:21 PM #5
You Hyphenist! How dare you!

Sorry guys, just wanted to acknowledge allnodcoms humor, moving along now...
JiminSA's Avatar
JiminSA   (Jim) JiminSA is offline JiminSA has a Profile Picture
Computer Specs
Member with 1,584 posts.
THREAD STARTER
 
Join Date: Dec 2011
Location: Johannesburg South Africa
Experience: Intermediate
26-Jun-2012, 12:35 PM #6
Don't be sorry, CK - Danny brightens my day with his sometimes cutting sense of fun!
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
26-Jun-2012, 12:55 PM #7
Thank you, thank you... I'll be here all week!

Danny
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑