How to include font name that has apostrophe

This is a discussion on "How to include font name that has apostrophe" within the PHP Forum section. This forum, and the thread "How to include font name that has apostrophe are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 17th, 2007, 16:17
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
How to include font name that has apostrophe

Here is my code:

Code: Select all
<div class="fontholder"><a href="preview.php?phrase=', $string, '&amp;font=fonts/Santa's Sleigh.ttf&amp;colour=black"><img src="fonts/santas_sleigh.jpg" alt="Santas Sleigh" width="131" height="35" /></a></div>
The apostrophe in Santa's Sleigh is a problem. Also do I need a "+" plus sign between the two words?

Thanks,
Linda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 17th, 2007, 16:19
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: How to include font name that has apostrophe

can't you use \' ?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 17th, 2007, 16:21
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to include font name that has apostrophe

When you need to use the same quote type that surrounds a statement -- in your case an apostrophe -- you have to 'escape it' with a back slash

Santa\'s Sleigh.

In your case a plus sign would be wise due to it being part of a query string in a url.

Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 17th, 2007, 16:30
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to include font name that has apostrophe

Thanks again Rakuli... that is perfect! Good job Alexgeek, I'm impressed!

Rep points for both of you!




Last edited by Lchad; Sep 17th, 2007 at 17:42.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
apostrophe becomes ’ aaronh Web Page Design 12 Jul 30th, 2007 13:38
using apostrophe in sql statement djanim8 Classic ASP 1 Oct 10th, 2006 13:09
Apostrophe in Text Output RobinDeanDotCom PHP Forum 2 Oct 4th, 2006 12:48
JS include timmytots JavaScript Forum 5 Jun 16th, 2006 01:49
Apostrophe... Lizard- Classic ASP 2 Aug 13th, 2004 13:11


All times are GMT. The time now is 21:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved