onfocus and onblur events -- I'm confused, of course...
This is the first time I have dealt with onfocus and onblur. I researched it, so I know a little more that I did.
In the following example snippet, however, I don't get the \" part. I know that the \ is used to escape the next character. However, I'm still confused. So, my questions are:
2. What is the \" doing?
PS. I did not compose the example code below. (Unlike my code, it works.)
When in PHP, a double quote (") marks the start or end of a string (line of text). When you want to use a double quote in a string, you will have to tell PHP that you are not using the double quote to end or start the string, but that it has to be part of the string itself. Do to so, you just have to add a slash before the double quote and PHP understands.
echo "your name is "jimmy"!"; // wrong, will result in an error
echo "your name is \"jimmy\"!"; // right, will give us: your name is "jimmy"
Thanks. I "thought" I understood that the \ character allowed the next character to not be literally taken (e.g., \n). However, I have now re-learned that it depends on the character, e.g., \" vs \t, etc.
|All times are GMT. The time now is 08:37 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0