We help IT Professionals succeed at work.

looping thought to output array not working

Alex Lord
Alex Lord asked
Last Modified: 2018-10-17
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.
Watch Question

This problem has been solved!
(Unlock this solution with a 7-day Free Trial)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions