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)

 

logo In PHP how a second  quotation mark explained?
Thomas Kincade table top Cottage telephone windows light up
Thomas Kincade table top Cottage telephone windows light up
Paypal   US $19.99
1960s GTE General System Round Metal Public Telephone Sign w Table Phone Image
1960s GTE General System Round Metal Public Telephone Sign w Table Phone Image
Paypal   US $24.99
ATT Trimline 210 Telephone Ivory Color Table Wall Vintage with Box Instruction
ATT Trimline 210 Telephone Ivory Color Table Wall Vintage with Box Instruction
Paypal   US $15.00

Tagged with:

Filed under: Telephone Table FAQ

Like this post? Subscribe to my RSS feed and get loads more!