[FX.php List] Stumbled on something I hadn't realized...

Anders Monsen andersm at alamark.com
Thu Nov 13 12:18:11 MST 2008


Yes, if you enclose the variables in double quotes. With single quotes  
you still need to concatenate.

Anders


On Nov 13, 2008, at 1:11 PM, Bob Patin wrote:

> I didn't realize that in PHP you can write
>
> <?php
>
> $string = "Bob";
>
> echo "$string needs to read up on PHP.";
>
> ?>
>
> I've been writing this:
>
> echo $string." needs to read up on PHP.";
>
> It never occurred to me to that you could put variables inside  
> quotes like that and that they'd be echoed back rather than  
> displayed as text...
>
> I've been writing things the hard way all this time... sheesh...
>
> Hopefully this will save someone else some time...
>
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat/AIM: bobpatin
> FileMaker 9 Certified Developer
> Member of FileMaker Business Alliance
> --------------------------
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>



More information about the FX.php_List mailing list