please define me what is the main difference between double quotes and single quotes ?
please define me that line
why we put "''" value in quotes .
because "" is used for print the value
and single quotes print the variable
but why used here single quotes for print the value and how print the value
That function is running condition.
Code:
$ans=20;
echo "$ans";
output 20
echo '$ans';
output $ans;
if we can type
function update_query($filename,$data,$where)
{
$sql= "UPDATE ".$filename." SET ";
foreach ($data as $key=>$value)
{
$sql.=$key."='$value'";
}
$sql = $sql." WHERE ".$where;
echo " ".$sql."<br>"; die;
return $res = $this->query($sql);
}
please define me that line
Code:
$sql.=$key."='$value'";
because "" is used for print the value
and single quotes print the variable
but why used here single quotes for print the value and how print the value
That function is running condition.
Comment