Help me explain the operating principle and the meaning of $diqusql.="'{$i}'"
$diqusql="diyu IN(";
foreach($diqu as $ i){
$diqusql.="'{$i}',";
$diqusql=rtrim($diqusql, ",")." )"
保哥后院2019-01-02 16:48:11
foreach is a statement that traverses an array. The standard usage is: foreach (data type identifier in expression)
e.g:
$person = array(
"name1" => "peter",
"name2" => "lisi"
);
foreach ($person as $ person_value) {
echo "Name:" . $person_value;
echo "<br>";
}