Re: Strings

From: Date: Tue, 05 Jun 2007 17:57:06 +0000
Subject: Re: Strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-256113@lists.php.net to get a copy of this message
do you notice the totally weird string delimiters in your original post? using either single quotes or double quotes (if you want variables named inside the string to be interpolated). read up on php strings here: http://php.net/string Steve Marquez wrote: > The following code works: > > <?php > > $image = ³²; > > if ($image == NULL) { > print ³False!²; > }else{ > print ³$var²; > } > > ?> > > However, this does not: > > <?php > > $image = ³²; > > if ($image == NULL) { > print ³False!²; > }else{ > print ³<img src=\²$var\²>²; > } > > ?> > > It seems that if I add a string, rather than just the variable, then does 'add a string' - huh? I don't understand what you mean, I'm (sure I'm) not the only one (to quote Lennon). > not work. I am getting an unexpected T_IS_EQUAL error. your syntax is broken because of the weird quotes it seems. > > -- > Thanks, > Steve Marquez >

« previous php.general (#256113) next »