Re: [PHP] HELP!!! QUOTES!
echo My dog has \fleas\; - Original Message - From: Shane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 9:20 AM Subject: [PHP] HELP!!! QUOTES! Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog has 'fleas'; puts out... My dog has 'fleas' But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES) (So I can call a JavaScript function) What am I missing here? As always... Thanks in advance my friends. - Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP!!! QUOTES!
Well if there are no variables to be parsed just do it like this: echo 'My dog has fleas'; // notice single quotes If there are variables to be parsed to it like this: echo My dog has \$var\; Cheers! Rick If I accept you as you are, I will make you worse; however, if I treat you as though you are what you are capable of becoming, I help you become that. - Johann Wolfgang von Goethe From: Shane [EMAIL PROTECTED] Date: Fri, 24 May 2002 16:20:45 -0700 To: [EMAIL PROTECTED] Subject: [PHP] HELP!!! QUOTES! Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog has 'fleas'; puts out... My dog has 'fleas' But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES) (So I can call a JavaScript function) What am I missing here? As always... Thanks in advance my friends. - Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP!!! QUOTES!
Escape the quotes with \ echo My dog has \fleas\; Or use single quotes echo 'My dog has fleas'; But note that variables aren't evaluated within single quotes. ---John Holmes... -Original Message- From: Shane [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 7:21 PM To: [EMAIL PROTECTED] Subject: [PHP] HELP!!! QUOTES! Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog has 'fleas'; puts out... My dog has 'fleas' But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES) (So I can call a JavaScript function) What am I missing here? As always... Thanks in advance my friends. - Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP!!! QUOTES!
Read a tutorial about using strings here: http://www.zend.com/zend/tut/using-strings.php The manual also talks about them: http://www.php.net/manual/en/language.types.string.php Regards, Philip Olson On Fri, 24 May 2002, Shane wrote: Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog has 'fleas'; puts out... My dog has 'fleas' But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES) (So I can call a JavaScript function) What am I missing here? As always... Thanks in advance my friends. - Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php