Alex Lord
asked on
looping thought to output array not working
The data
the source of data
my effort
result is none lol so not sure.
the source of data
$jrArr[$jrID] = array (
'id'=>$jrID,
'date'=>$getJourney['Date'],
'name'=>$getJourney['name'],
'info'=> empty($info) ? $getJourney['jrEvent'] : $info,
'step'=>$step
);
$response = array(
'Result' => 'getJrDetails success',
'jr' => $jrArr,
'jrCount' => $jrCount
);
my effort
for(i = 0; i < response.jr.length; i++){
var d = new Date(parseInt(response.jr['date'])*1000);
var day = String(d.getDate());
if(day.length == 1)
{
day = "0"+day;
}
var month = String(d.getMonth()+1);
if(month.length == 1)
{
month = "0"+month;
}
var year = d.getFullYear();
html = html + '<tr id="jr-'+response.jr[i]['id']+'" name="'+response.jr[i]['id']+'">'
+ '<td>'+day+'-'+month+'-'+year+'</td>'
+ ' <td>'+response.jr[i]['name']+'</td>'
+ '<td>'+response.jr[i]['step']+'</td>'
+ '<td>'+response.jr[i]['info']+'</td>'
+ '</tr>';
}
result is none lol so not sure.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.