1
   

PHP variables

 
 
Reply Sun 17 Apr, 2005 08:02 am
PHP beginner question here...

I'm trying to define variables with characters in them that PHP uses as syntax. For instance:

Code:$variable1='Today's date is April 17th'


The apostrophe after "y" in "Today's" tells PHP that I'm done defining the variable, when in fact I'm not. Is there some other method I can use?

Thanks in advance Smile
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 567 • Replies: 1
No top replies

 
Craven de Kere
 
  1  
Reply Mon 18 Apr, 2005 12:01 am
You need to escape them like this:

Code:
$variable1='Today\'s date is April 17th'
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » PHP variables
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.17 seconds on 01/18/2025 at 04:58:59