Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:24:45+00:00 2026-06-03T22:24:45+00:00

<?php foreach ($data[‘ACTION_DATA’][‘messages’] as $msg) { ?> <form> <table> <tr><td>Name:</td><td id=name><?php echo $msg[‘name’]; ?>

  • 0
<?php foreach ($data['ACTION_DATA']['messages'] as $msg) { ?>
<form>
  <table>
   <tr><td>Name:</td><td id="name"><?php echo $msg['name']; ?> </td></tr>
   <tr><td>Telephone Number:</td><td id="tp"><?php echo $msg['tp_number']; ?></td></tr>
   <tr><td>ID:</td><td id="id"><?php echo $msg['id']; ?> </td></tr>
   <tr><td colspan="2"><input type="button" id="sub_button" onclick="show_popup()" value="View"></td></tr>
  </table>
</form>
<?php }; ?>

I used above code sample to display my page content. I want to get values according to instance block. and display them in popup window when click on the “View” button without re-load the page. pleace help me. thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:24:47+00:00Added an answer on June 3, 2026 at 10:24 pm

    I would add another input, with type hidden to hold the total number of entries. I would have each name, telephone and id inputs have different ids by adding an index number for each, something like:

    <?php 
    $index = 0
    foreach ($data['ACTION_DATA']['messages'] as $msg) { ?>
    <form>
      <table>
       <tr><td>Name:</td><td id="name<?php echo $index;?>"><?php echo $msg['name']; ?> </td></tr>
       ... same for the others ...
       <?php // increment index 
        $index++;
        ?>
       ....
    

    And then use a for loop (you can get the total number of entries form the hidden input field) to browse through all the values.

    If you want to only view one of them, send the index number as a parameter to the show_popup() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datalist: <datalist id=subjects> <?php foreach($subjects as $v){ ?> <option data-subjectid=<?php echo
I am having problems posting this multi checkbox data with ajax. <?php foreach($_SESSION['contacts'] as
I make this php program to access mysql data foreach ($arrayOfID as $ID) {
i have this code right here: <select name=group> <option value=>Choose a group....</option> <?php foreach($groups
foreach($data['data'] as $data){ $count = $data['number']; } // $data['number']; will return some number like:
I insert some data from a php foreach. And when the data insert, I
Let's say I have data string like this... one=1&two=2&three=3&four=4&two=2 I'm using php foreach to
I want to make a PHP JSON data foreach, but I met some problem.
I would like to post data in checkboxes, as like <?php foreach($data as $foreignid
$j=1; ?> var t =''; var options = ; </script> <?php foreach ($this->data['DEFAULTS'] as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.