Meaning of Curly Braces in PHP

What is the meaning of curly braces in PHP?

In PHP curly braces are used to explicitly indicate the end of a string.

for example let’s say you have this:

$computer = ‘computer’;

if i write

echo “There are 10 $computers in the room”;

The parser will tell that it does not recognize $computers.

Notice: Undefined variable …

however the parser will be very happy with the following:

echo "There are 10 {$computer}s in the room";

Reference

http://www.php.net/manual/en/language.types.string.php

Move Firefox Reload or Refresh Button

Firefox is so cool. For weeks I kept whining about why Firefox moved the reload button to the right side of the address bar, but little that i know, i could move it to the left by the “back and forth” navigation where it belongs.

To do the same follow these steps:

First

Right click on your "navigation toolbar" and click on Customize:

Second

Just drag the reload icon/button from one side to the other.

Remove Slashes added by mysql_real_escape_string

Here step my step how to solve the issue

First

Verify the status of your get_magic_quotes_gpc directive

if (get_magic_quotes_gpc())
   echo 'Magic Quotes is enabled';
else
  echo 'Magic Quotes is disabled';

or check your php.ini via

echo phpinfo();

Second

If your magic quotes is ON you will need to use the stripslashes function before you use the mysql_real_escape_string function. Remember both Magic quotes and mysql_real_escape_string add slashes so you do not want to that twice. Some people would say just turn magic quotes off in php.ini, well i prefer not going to my php.ini if i do not have to.

mysql_real_escape_string(stripslashes($_POST['firstname']));

Third

If your magic quote is off you just have to use stripslashes once when you retrieve the data.