[pmwiki-users] Hg tweaks...

Américo Albuquerque aalbuquerque at lanowar.sytes.net
Fri Feb 2 15:03:15 CST 2007


Kathryn Andersen wrote:
(...)
>  
> Oh, I've also run into something puzzling, a line which I changed...
> 
>  $FmtPV["$$hg"] = "'" . $gg . "'";
> 
> Wouldn't that work better as the following?
> 
>  $FmtPV['$' . $hg] = "'" . $gg . "'";
> 
> I'm not sure that the $$ will give what is needed.  Or maybe I'm just
> being paranoid.
> 
Those sentences do different things. When you use ["$$hg"] you are 
saying to use the '$' character before the hg'. That is the same as 
writing ['$hg'] (note the single quotes).
When you write ['$' . $hg] you are saying to use the '$' character 
before the contents of the $hg variable

Basically, the $$ inside double quotes is changed into a single $


Americo Albuquerque




More information about the pmwiki-users mailing list