title: How to Parse php json_decode data to Jquery Ajax request
body: <p>The current problem now is this, the below files are working perfectly well, but when using console.log(data), it prints out the result I wanted very well.</p>
  
  <p>But what I want is to print out the result in a html tag (div) profoundly instead of <code>console.log()</code>.</p>
  
  <p>The Php File section </p>
  
  <pre><code>&lt;?php
  
  $transaction_id = $_POST['transaction_id'];//get the Transaction ID from Ajax request..
  
  //get the full transaction details as an json from VoguePay
  $json = file_get_contents('https://example.com/?v_transaction_id=' . $transaction_id . '&amp;type=json');
  
  $transaction=json_decode($json, true);
  
  //header('Content-Type: application/json');
  echo json_encode($transaction);
  </code></pre>
  
  <p>The Ajax Section...</p>
  
  <pre><code>            //clear the display section
              $("#id-input2").html('');
              var data="";
              //call the Ajax Request..
              $.ajax({
                  url: "php/fetch_transaction_id.php",
                  type: "POST",
                  data: {transaction_id:transaction_id},
                  dataType: "json",
  
                  success: function (vp_response) {
                      $.each(vp_response, function(index, value) {
  
                          data=(index + ': ' + value);
                          console.log(data);
                      });
  
                      $('#searchID').val('Data Recieved!');
                  },
  
              });
  </code></pre>
  
  <p>Here is the output for using <code>console.log();</code>:</p>
  
  <blockquote>
    <p>cur: NGN<br>
        transaction_id: 5a3182d82a8c6<br>
        email: talk2awe2004@example.com<br>
        total_amount: 1016.7000<br>
        total: 1000<br>
        merchant_ref:<br>
        memo: MLM Bank Union Creation<br>
        status: Approved<br>
        date: 2017-12-13 20:49:26<br>
        method: MasterCard &amp; Verve (Naira)<br>
        referrer: <a href="https://www.mlmbank.net/Leaders/create.html" rel="nofollow noreferrer">https://www.mlmbank.net/Leaders/create.html</a><br>
        total_credited_to_merchant: 1001.450000<br>
        extra_charges_by_merchant: 16.700000<br>
        charges_paid_by_merchant: 15.250000<br>
        fund_maturity: 2017-12-15<br>
        merchant_id: 3362-0054095<br>
        total_paid_by_buyer: 1000<br>
        process_duration: 0.000395</p>
  </blockquote>
  
  <p>I want same using a html tag instead.</p>