soap client - Unable to alert the message by capturing the array value in php using javascript. -


    foreach ($record_sets $row) {         $params->loginname = "a";         $params->password = "xxxxxxx";         $params->studentresult = "<a1><marks>95</marks><grade>a</grade></a1>";          $params->rollid = $row[0];          $response = $client->marksofstudent($params);         $result = $response->marksresult->sqlxml->any;          var_dump($result);              if (strpos($result, 'error') === false) {         /* nothing */     }  else {         $array = array(                     "marks" => $row[0],                     "subject"  => $row[1]                  );     ?>      <script>     message = 'failure post ' + <?php echo $array->$row[0]; ?> + 'reportid , ' + '<?php echo $array->row[1]; ?>' +  'certificatenumber';     adiha_createmessagebox('alert', message);     </script> <?php } } ?>     } 

i want prompt message after execution of foreach loop , capture $row[0] , $row[1] value , alert message 'unable $row[0] , $row[1] combination update'. in above code, cannot $row[0] , $row[1] value.

i want message 'unable upload marks 1 subject x marks 2 subject y'.

i have no idea doing if want use data adding array have change code:

else {     $array = array(         "marks" => $row[0],         "subject"  => $row[1]     ); ?>  <script>     message = 'failure post ' + <?php echo $array['marks']; ?> + 'reportid , ' + '<?php echo $array['subject']; ?>' +  'certificatenumber';     adiha_createmessagebox('alert', message); </script> 

or use $row[0] , $row[1] instead if not use array otherwise in code.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

mysql - Pass value between different pages (form) with PHP -