Re: [PHP] Single Quote in String functions

2007-07-12 Thread Richard Lynch
On Thu, July 12, 2007 7:02 am, Sancar Saran wrote:

> I cannot do any operation wiht single quote like
>
> explode("'",$strContent);
>
> Did I miss someting ?

Works for me, so you've definitely missed something somewhere.

Like telling us what's in $strContent and whatever else is before the
code that you think is broken, but isn't, because that code that came
before this code is what's really broken.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Single Quote in String functions

2007-07-12 Thread Robert Cummings
On Thu, 2007-07-12 at 15:47 +0300, Sancar Saran wrote:
> On Thursday 12 July 2007 15:11:28 Stut wrote:
> > Sancar Saran wrote:
> > > I cannot do any operation wiht single quote like
> > >
> > > explode("'",$strContent);
> > >
> > > Did I miss someting ?
> >
> > In what way "can't"? What happens / doesn't happen?
> >
> > -Stut
> >
> > --
> > http://stut.net/
> 
> Hi,
> 
> Problem was
> 
> $strng = "'cInputI' style='width:146px;'>";

Shouldn't that be $string = ...?

> $arrExplode = explode("'",$string);
> 
> $arrExplode contins
> 
> [array][1]
> * "0"=>[string]['cInputI' style='width:146px;'>]
> 
> And not only explode for example I canot trim first "'" 

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

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



Re: [PHP] Single Quote in String functions

2007-07-12 Thread Sancar Saran
On Thursday 12 July 2007 15:11:28 Stut wrote:
> Sancar Saran wrote:
> > I cannot do any operation wiht single quote like
> >
> > explode("'",$strContent);
> >
> > Did I miss someting ?
>
Omg, It's my bad, sorry for lameness. 

Before the exploding text I do some encoding decodings. 

So? I do mis sequenced decodings. Thats why it does not work explode or trim, 
or str_replace even all other string functions.

Regards

Sancar

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



Re: [PHP] Single Quote in String functions

2007-07-12 Thread Sancar Saran
On Thursday 12 July 2007 15:11:28 Stut wrote:
> Sancar Saran wrote:
> > I cannot do any operation wiht single quote like
> >
> > explode("'",$strContent);
> >
> > Did I miss someting ?
>
> In what way "can't"? What happens / doesn't happen?
>
> -Stut
>
> --
> http://stut.net/

Hi,

Problem was

$strng = "'cInputI' style='width:146px;'>";
$arrExplode = explode("'",$string);

$arrExplode contins

[array][1]
* "0"=>[string]['cInputI' style='width:146px;'>]

And not only explode for example I canot trim first "'" 

Regards

Sancar

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



Re: [PHP] Single Quote in String functions

2007-07-12 Thread Stut

Sancar Saran wrote:

I cannot do any operation wiht single quote like

explode("'",$strContent);

Did I miss someting ?


In what way "can't"? What happens / doesn't happen?

-Stut

--
http://stut.net/

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



Re: [PHP] single quote escape questions

2004-04-20 Thread Hardik Doshi

> Secondly, what is best/favorite way to escape chars
> for mysql?  I know that mysql_real_escape_string() 
> has been recommended recently.  But that brings up
> the
> issue of magic quotes.  Would
> set_magic_quotes_runtime(0) be a reliable way of
> making sure my code runs with magic quotes off?

It's recommended to use mysql_real_escape_string() to
eacape funky characters. Addslashes() does the same
thing but as we are storing data in the database so
it's better to offload it to the database. In future
if database needs to escape another character then
mysql_real_escape_string() will take care of it
easily.
 
> Thanks for your time,
> Kathleen

Hardik Doshi

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





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25ยข
http://photos.yahoo.com/ph/print_splash

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



RE: [PHP] single quote replace

2001-09-11 Thread Jack Dempsey

php does;-)

$text = str_replace("'","replace_text",$text);

-Original Message-
From: Clint Tredway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 11, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] single quote replace


Does anyone have a function that will replace single quotes inside a string?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Single quote

2001-07-06 Thread Alexander Deruwe

On Fri, Jul 06, 2001 at 11:28:38AM +0200, Andy wrote:
> I got a data file containing this line:
> $ 1'000'000.-
> 
> Then I read and echo this line
> $fp = fopen ( $sFilename,"r");
> $sData = fgets ( $fp, 1000 ) )
> 
> echo $sData
> 
> Now what came out is
> $ 1\'000\'000.-
> 
> I tried to get rid of these slashes with
> ereg_replace( "\\'", "'", $sData );
> but I had no luck.
> 

Use: stripslashes($sData);
That ought to do the trick..

ad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Single quote

2001-07-06 Thread Steve Brett


string stripslashes (string str)


Returns a string with backslashes stripped off. (\' becomes ' and so on.)
Double backslashes are made into a single backslash. 

Steve

> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: 06 July 2001 10:29
> To: [EMAIL PROTECTED]
> Subject: [PHP] Single quote
> 
> 
> I got a data file containing this line:
> $ 1'000'000.-
> 
> Then I read and echo this line
> $fp = fopen ( $sFilename,"r");
> $sData = fgets ( $fp, 1000 ) )
> 
> echo $sData
> 
> Now what came out is
> $ 1\'000\'000.-
> 
> I tried to get rid of these slashes with
> ereg_replace( "\\'", "'", $sData );
> but I had no luck.
> 
> Who can help?
> Andy.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]