Re: quote
| From: | Jack Dempsey | Date: | Thu, 30 Aug 2001 02:01:55 +0000 |
| Subject: | Re: quote | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65147@lists.php.net to get a copy of this message | ||
i'm not sure what you're trying to do, but why not this?
$var = 'foo';
$quoted_var = '"' . $var . '"';
jack
davidt wrote:
> php-general -
>
> how to quote the value of the variable? I am looking for function it is something like
> $testvar=false
> quotefunc($testvar);
> now the value is "false"
>
> This failed....
>
> $boo=false;
> exec("sed -e s/$boo/true/g $pathfile > $newfile")
>
> So i replace $boo value with
> $boo="false"; <--- add " "
> and it works.
>
> davidt
> mailto:davidt@aspsaic.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net