This is a discussion on "Apostrophe in Text Output" within the PHP Forum section. This forum, and the thread "Apostrophe in Text Output are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Apostrophe in Text Output
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Apostrophe in Text Output
Hello.
How do I place an apostrophe in the textual output of a php document? namely, I want the output to be ::: you're ::: instead of ::: you are ::: |
|
|
|
|||
|
Re: Apostrophe in Text Output
You've probably tried print ('You're'); and had it complain. Try print ("You're"); instead.
Background - PHP supports single quoted strings (where everything is taken literally) and double quoted strings (where the $ and \ characters have special significance). Although you can use a " in a " string (with \"), you cannot do the same thing to get a ' in a ' string. |
|
||||
|
Re: Apostrophe in Text Output
You can escape apostrophies in a string using apostrophies...
You may also want to look into the functions addslashes() and stripslashes(). |
![]() |
| Tags |
| text output |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Php output in to CSS | dhossai | Web Page Design | 1 | Oct 30th, 2007 18:38 |
| How to include font name that has apostrophe | Lchad | PHP Forum | 3 | Sep 17th, 2007 16:30 |
| 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... | Lizard- | Classic ASP | 2 | Aug 13th, 2004 13:11 |