PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1847
Number of posts: 5013

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
putting text with alot of " ' into a variable... Posted by Firestorm on 20 Jul 2003 at 5:19 AM
Hi,
I have another problem:
how can I put some text into a variable that contains alot of " and ' that should not be escaped by a \. I know in PERL you can write something like:
$text = |
""''ladsjflaksjdfh""''
|;

is there something similar in PHP?
________________________________
http://www.againsttcpa.com
Don't give big brother a chance!
Report
Re: putting text with alot of " ' into a variable... Posted by DarQ on 20 Jul 2003 at 5:49 AM
you dont wanna use slashes to escape those chars.??? hmm.

http://www.php.net

stripslashes
addslashes

you could use those functions perhaps


: Hi,
: I have another problem:
: how can I put some text into a variable that contains alot of " and ' that should not be escaped by a \. I know in PERL you can write something like:
: $text = |
: ""''ladsjflaksjdfh""''
: |;
:
: is there something similar in PHP?
: ________________________________
: http://www.againsttcpa.com
: Don't give big brother a chance!
:

DarQ
url--> http://space.servehttp.com (ssh,ftp,http etc etc)

Report
Re: putting text with alot of " ' into a variable... Posted by DigitalSmash on 27 Jul 2003 at 2:36 AM
This message was edited by DigitalSmash at 2003-7-27 2:37:11

$sData = <<<data
You can put anything in here ' " ' " *&%$"
data;

That should do it!
Dave


Report
Re: putting text with alot of " ' into a variable... Posted by Firestorm on 27 Jul 2003 at 3:59 AM
Thank you all. It helped me out.
________________________________
http://www.againsttcpa.com
Don't give big brother a chance!




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.