|
-
Aug 1st, 2001, 01:14 PM
#1
Thread Starter
Member
php qq() equivilent?
is there an equivilent to perls qq() function?
Code:
print qq(some text with unescaped quotes " here " );
thanks
I swear you guys rip on me 13 or 14 more times, i'm outta here...
-
Aug 1st, 2001, 02:57 PM
#2
I am not sure if there is. can you explain this one to me though.
Code:
# Double quotes: qq()
$firstVar = 1;
$secondVar = qq($firstVar);
print "with qq() secondVar = $secondVar\n";
Prints: with qq() secondVar = 1
what exactly is the qq() doing??? I don't see it doing anything.
-
Aug 1st, 2001, 05:20 PM
#3
Thread Starter
Member
well, qq() will basically just let you specify a string without escaping quotes.
for example:
Code:
$this = "and god said \" let there be light \"";
$that = qq(and god said "let there be light");
$this and $that both == and god said "let there be light"
I swear you guys rip on me 13 or 14 more times, i'm outta here...
-
Aug 1st, 2001, 05:50 PM
#4
thanks, that makes more since. the only thing I can think of is stripslashes(). other than that I don't know. can't you use single quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|