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
php echo problem
Re: php echo problem
sorry , when i try <?php echo json_encode($disp, JSON_PRETTY_PRINT);?> it shows me the corect last Date but like this : [ "2020-05-08" ]
and when i try <?php echo $disp; ?> it shows me the word Array
I copied wrong.
Please help me.
Thank you
and when i try <?php echo $disp; ?> it shows me the word Array
I copied wrong.
Please help me.
Thank you
Re: php echo problem
Maybe this could help:
Code: Select all
$sql = "SELECT
date_format(`Date`, "%Y-%m-%d")
FROM Reg_Fin_Z
ORDER by `Date` DESC
LIMIT 1";
$my_date = sqlValue($sql);
echo $my_date;
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools