Daniel Staal wrote:
--On Saturday, October 25, 2003 20:48 -0400 Anthony J Segelhorst <[EMAIL PROTECTED]> wrote:

How can add double qoutes around "SNMP Service" to the variable
$servicename?

I have tried $doubleqoutes_servicename = "$servicename";

This does not work though.

Any ideas?


Either of the following should work:

$doubleqoutes_servicename =  "\"$servicename\"";
$doubleqoutes_servicename =  '"'. $servicename .'"';

My preference is the latter, but only because I find it easier to read. (And that is partly because of BBEdit's coloring system: the latter colors less ambiguously.)

Some also find:


$var = qq("This is quoted");

appealing. I prefer the first above, for a similar reason, vim colors the escaped characters a pretty color too...

http://danconia.org


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to