In PHP how a second ‘ quotation mark explained?
I cannot undestand why they put a second quotes around a superglobal or a a variable like $tel_number : for example in the following statement
if ($_POST[“tel_number”]) {
91: //something relevant, so add to telephone table
92: $add_tel_sql = “INSERT INTO telephone (master_id, date_added,
93: date_modified, tel_number, type) VALUES
94: (‘“.$master_id.”’, now(), now(),
95: ‘“.$_POST[“tel_number”].”’,
96: ‘“.$_POST[“tel_type”].”’)”;
97: $add_tel_res = mysqli_query($mysqli, $add_tel_sql)
98: or die(mysqli_error($mysqli));
99: }
take this as an example from the above 94: (‘“.$master_id.”’
note the inner quotes and the outer quotes. Why do we have to use this, Ca'nt we take only ".$master_id." without the outer quotes. I would appreciate any explanation
Possibly related posts: (automatically generated)
- Related posts on explained
- Auto/Car Insurance Coverage Laws Explained – New York State | All ...
- Japanese Candlesticks Explained | Munger 08
- The XOWii Compensation Plan - Explained | elegantclydes.com
- Related posts on mark
- Mark Cuban's Solutions to Fix the Stock Market
- The continuing genius of Mark E. Smith and the Fall | pampelmoose ...
- Looking for the Next Facebook | Mark Evans Tech
- Related posts on quotation
- Getting Home Insurance Quotes Is Easy « It is So Easy to Be Yourself
- Why Is The Program Of Forex News Necessary For The Forex Trader ...
![]() |
Tagged with: explained • mark • quotation • second
Filed under: Telephone Table FAQ
Like this post? Subscribe to my RSS feed and get loads more!


US $19.99



By the above, they mean a string that itself contains quotes. In this case ‘.$master_id.’ is the actual string value (quotes and all). ” ‘.$master_id.’ ” (spaces added for clarity) means the string constant ‘.$master_id.’