Re: Strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux