php echo problem
Posted: 2020-05-10 07:32
Hello. i have a problem and i do not know what i am doing wrong...
Here is my code :
$disp = array();
$disp_fields = get_sql_fields('Reg_Fin_Z');
$disp_from = get_sql_from('Reg_Fin_Z');
$res = sql("SELECT Date FROM Reg_Fin_Z ORDER by `Date` DESC LIMIT 0, 1", $eo);
while($row = db_fetch_assoc($res)){
$disp[] = $row[Data];
}
So, when i try with : <?php echo json_encode($incasari, JSON_PRETTY_PRINT);?> it shows me the corect last Date but like this : [ "2020-05-08" ]
and when i try <?php echo $incasari; ?> it shows me the word Array
I need to have display the date but in simple way without [ and " . Like this : 08-05-2020.
What i am doing wrong ?
Thank you
Here is my code :
$disp = array();
$disp_fields = get_sql_fields('Reg_Fin_Z');
$disp_from = get_sql_from('Reg_Fin_Z');
$res = sql("SELECT Date FROM Reg_Fin_Z ORDER by `Date` DESC LIMIT 0, 1", $eo);
while($row = db_fetch_assoc($res)){
$disp[] = $row[Data];
}
So, when i try with : <?php echo json_encode($incasari, JSON_PRETTY_PRINT);?> it shows me the corect last Date but like this : [ "2020-05-08" ]
and when i try <?php echo $incasari; ?> it shows me the word Array
I need to have display the date but in simple way without [ and " . Like this : 08-05-2020.
What i am doing wrong ?
Thank you