I am a novice in PHP. I have the following snippet from my PHP Code
$select = "SELECT budgetname,SUM(budgetamount) AS budget,sqlitebudgetid FROM budget WHERE budgettype = 'INCOME' AND budgetaccount = '$budgetAccount' AND budgetuser = '$userID' AND budgetdate BETWEEN '$fromDate' AND '$toDate' GROUP BY BudgetName ASC";
$result = mysqli_query($con, $select);
while($row = mysqli_fetch_array($result)) {
$rowIncomeBudgetLabels[] = $row["budgetname"];
$rowIncomeBudgetAmounts = array($row["budget"],$row["budget"], row["sqlitebudgetid"]);
}
I have tried to put the last part $rowIncomeBudgetAmounts into the following array but the result only display the first line.
I tried as below but id not working :
$data = array($rowIncomeBudgetAmounts);
Want to put to an array as below : so that each line is displayed as a separate sub array. Please help.
$data = array( array( 255, 100, 100 ),
array( 100, 255, 100 ),
array( 100, 100, 255 ),
array( 255, 255, 100 ),
);
EDIT >>
I am getting the following results ; instead of several lines - I am only getting the first line. On the graph all descriptions are showing but without all corresponding figures.
PERFECT : This is the result I wanted : Thanks @Ultrazz008

