Salve ho questo problema che non riesco a risolvere:
Questi sono gli allert che escono:
Warning: Undefined variable $a in /web/htdocs/wwwxxxyyy.it/home/farmacia/dashboard.php on line 210
Warning: Undefined variable $b in /web/htdocs/www.xxxyyy.it/home/farmacia/dashboard.php on line 211
Se qualcuno puo aiutarmi ne sarei lieto.
PHP:
<?php
//error_reporting(0);
//require_once('../constant/connect.php');
$qqq = "SELECT * FROM product WHERE status ='1' ";
$result = $connect->query($qqq);
//print_r($result);exit;
foreach ($result as $row) {
//print_r($row);
$a .= $row["product_name"] . ',';
$b .= $row["quantity"] . ',';
}
$am = explode(",", $a , -1);
$amm = explode(",", $b , -1);
//print_r($a);
//print_r($b);
$cnt = count($am);
$datavalue1 = '';
for ($i = 0; $i < $cnt; $i++) {
$datavalue1 .= "['" . $am[$i] . "'," . $amm[$i] . "],";
}
//echo
$datavalue1; //used this $data variable in js
?>
Warning: Undefined variable $a in /web/htdocs/wwwxxxyyy.it/home/farmacia/dashboard.php on line 210
Warning: Undefined variable $b in /web/htdocs/www.xxxyyy.it/home/farmacia/dashboard.php on line 211
Se qualcuno puo aiutarmi ne sarei lieto.