RE: Re: Really easy question

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

 



$str = '"hi"';
$newstr = eregi_replace("\"", "", $str);



-----Original Message-----
From: Peter Beckman [mailto:beckman@purplecow.com]
Sent: Wednesday, 19 March 2003 4:33 PM
To: Foong
Cc: php-db@lists.php.net
Subject: Re:  Re: Really easy question


$str = '"hi"';
$newstr = preg_replace("/\"/", "", $str);

On Wed, 19 Mar 2003, Foong wrote:

> try
>
> $with_quote = '"0"';
> $without_quote = str_replace('"', '',  $with_quote);
>
> Foong
>
>
> "Jeremy" <jeremy@basinbroadband.com> wrote in message
> 001f01c2edd0$4e945680$1e52c541@nunya">news:001f01c2edd0$4e945680$1e52c541@nunya...
> Hey folks,
> Im apologize that this is just a really easy general php question but any
> help would be appreciated.
>
> if i have a variable that is = to something like "0" or "1"
>
> but I just need it to be 0 or 1. how do i strip the " off.
>
> thanks,
> Jeremy
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
beckman@purplecow.com                             http://www.purplecow.com/
---------------------------------------------------------------------------

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




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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux