Avatar of Alex Lord
Alex Lord
 asked on

looping thought to output array not working

The data


the source of data

$jrArr[$jrID] = array (
				  'info'=> empty($info) ? $getJourney['jrEvent'] : $info,

Open in new window

		$response = array(
			'Result' => 'getJrDetails success',
			'jr' => $jrArr,
			'jrCount' => $jrCount

Open in new window

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>';

Open in new window

result is none lol so not sure.
* arraysJavaScriptPHP

Avatar of undefined
Last Comment
Alex Lord

8/22/2022 - Mon
Alex Lord

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck