$goal=array();
//goal
$sql="";
//!mysqli_query($con,$sql))
$result = mysqli_query($con,"SELECT * FROM metrics where ini_name = '$ini'");/*table name*/
while($row = mysqli_fetch_array($result))
{
array_push($goal,$row['metric_desc']);/*column name*/
array_push($goal_id,$row['metric_id']);
}
$matrix=array();
//goal
$sql="";
我正在尝试将值从数据库推送到数组中,但我收到警告
Warning: array_push() expects parameter 1 to be array, null given in C:\xampp\htdocs\xampp\Testing\Int\sq2.php on line 195