Ok that is easy:
The backslash is called escaping. You need to escape special chars so the interpreter can understand what you want.
e.g.
Code: Select all
$var = "<a href="index.php">Link</a>";
can't work as expected as php wouzld consider the second " as string end.
You use the \
Code: Select all
$var = "<a href=\"index.php\">Link</a>";
and it works like intended
I have personally not used commas but points but the effect is the same.
Code: Select all
$var = "<A href=\"dblist.php?", $tablename, "\">", $tablename, "</A>";
It simply lines strings together to 1 string. However in that case above it is unnesessary.
Code: Select all
$var = "<A href=\"dblist.php?$tablename\">$tablename</A>";
would do the same as variables execute within "".
To complicate the matter you can use ' ' to outline strings and I actually would recommend it. It seems more complicated at first but it can avoid errors later. Between ' ' you don't need to escape chars exept \ and '.
Code: Select all
$var = '<A href="dblist.php?'.$tablename.'">'.$tablename.'</A>"';
would output the same as above. You need to move the variables out of the ' ' because they don't execute there.