I am passing a date into an index of a Array
. As looping is performed, this Array
is being fed. The index is also generated through this looping.
However, when starting the index, it displays only 1 character (as if it were "fragmented" within Array
). I think it's a simple mistake, though, I'm hitting myself for not having it yet.
$pcb_data = array();
while($r = $DB->fetchArray($result)){
$pcb_cmb_id = $r['pcb_cmb_id'];
$pcb_data[$pcb_cmb_id] = date("d/m/Y", strtotime($r['pcb_data']));
}
If I print $pcb_data[4]
, for example, it will display "2", instead of a date (eg 12/12/1988).
Note: I cut the while code because the rest of the information has no relevance, in this case.
Can anyone help me, please?