php array , how to display array data in email -
$qua1 = "5"; $querynotification= "select * stock stockqty <= :qua1 "; $stmt3 = $conn->prepare($querynotification); $stmt3->bindparam(':qua1',$qua1); $stmt3->execute(); while ($querynotrow = $stmt3->fetch()){ $a=array("qty"=>$querynotrow['stockqty'],"name "=>$querynotrow['stockname'],"cb "=>$querynotrow['stockprice']); // $array[$querynotrow['stockqty']] = $querynotrow['stockname']; foreach( $a $row ): $b = "stockqty = " . $querynotrow['stockqty'] . " , stockname = " . $querynotrow['stockname'] . "<br>"; endforeach; echo $b; }
if add send email code inside foreach loop , system send many email according on how many data. how can send data 1 email??
foreach( $a $row ): echo "stockqty = " . $row['qty'] . " , stockname = " . $row['name'] . "<br>"; endforeach;
Comments
Post a Comment