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

  • SEARCH
  • Home
  • 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 6938417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:29:27+00:00 2026-05-27T12:29:27+00:00

$result is actually an array which looks like this: Array ( [book_title] => Bioethics

  • 0

$result is actually an array which looks like this:

Array ( [book_title] => Bioethics in the 21st Century [id] => 1424
[isbn] => 978-953-307-270-8 [unix_name] =>
bioethics-in-the-21st-century [visible_online] => 1 )

This is my view(better said…poor attempt of a view ). I’m trying to get an alignment based on the index of the array. Like so:
http://pastebin.com/z13PZWe8

<table class="datagrid grid_collapsible" width="100%" cellpadding="2" cellspacing="0" id="webbooks_table">
            <thead>
    <tr class="datagrid_header"
        <td>Book title</td>
        <td>ID</td>
        <td>ISBN</td>
        <td>Is it visible online?</td>
    </tr>
        </thead>

    <tbody>
        <?php foreach($this->basicBwDetails as $result): ?>
        <tr>    
    <td><?=$result;?>  </td>
        </tr>
        <?php endforeach; ?>

    </tbody>



</table>

Thank you for your help!

  • 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-05-27T12:29:28+00:00Added an answer on May 27, 2026 at 12:29 pm

    Are you trying to do this?

    <table class="datagrid grid_collapsible" width="100%" cellpadding="2" cellspacing="0" id="webbooks_table">
    
      <thead>
        <tr class="datagrid_header">
          <td>Book title</td>
          <td>ID</td>
          <td>ISBN</td>
          <td>Is it visible online?</td>
        </tr>
      </thead>
    
      <tbody>
    <?php foreach($this->basicBwDetails as $result): ?>
        <tr>    
          <td><?php echo $result['book_title']; ?></td>
          <td><?php echo $result['id']; ?></td>
          <td><?php echo $result['isbn']; ?></td>
          <td><?php echo ($result['visible_online']) ? 'Yes' : 'No'; ?></td>
        </tr>
    <?php endforeach; ?>
      </tbody>
    
    </table>
    

    As a side note, <?=$var;?> syntax should be avoided since short_open_tag is disabled in many PHP installations, and this was required to use that syntax until PHP 5.4.0

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

Sidebar

Related Questions

Can someone explain this result to me. The first test succeeds but the second
I've got a procedure which fills some arrays with values taken from another array.
I have a string which I need to split into an array and then
I don't know what overhead there is in int array lookups. Which would perform
I've seen this post which describes how to use the graph api to check
I have a file like this: 1234 1234 First Name Last Name And I
I'm trying to pass an array to a model which has a query. I'm
As a result of this question from a few days ago there are a
I read an .ini File and put every property into an temporary array which
I have two buttons (liked/disliked) which are actually images attached to an href tag

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.