Expand|Select|Wrap|Line Numbers
- $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
Expand|Select|Wrap|Line Numbers
- $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.