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 7776923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:00:13+00:00 2026-06-01T18:00:13+00:00

I want to put my outputted PHP into a table but it doesn’t like

  • 0

I want to put my outputted PHP into a table but it doesn’t like it…

The layout I want is like this

ROW – Desctiption URL
ROW2- Meta Description

And it needs to keep this same layout even when I enter more then one URL.

What happens now is that when I input lots of urls it puts all of the same parts into the same cell.. How can I change this?

Sorry its hard to explain…

Here is the code:

<?php
ini_set( "display_errors", 0);
//make the array 
$TAarray = explode("\n", strip_tags($_POST['TAData'])); 

foreach ($TAarray as $key => &$line) {
        $line = trim($line); 
        // get the meta data for each url
        $tags = get_meta_tags($line);

        echo '<tr>';
        echo (isset($tags['description']))?"<tr><td>Description($line)</td>  </tr>".$tags['description']:"<tr><td>Description($line)</td></tr><tr><td>No Meta    Description</td></tr>.";
        echo '</tr>';
}

?>
  • 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-01T18:00:15+00:00Added an answer on June 1, 2026 at 6:00 pm

    You’ve got some awkward HTML there.. Try doing it like this:

    //start the table
    echo "<table>";
    foreach ($TAarray as $key => &$line) {
            $line = trim($line); 
            // get the meta data for each url
            $tags = get_meta_tags($line);
    
            //start a new row in the table
            echo '<tr>';
            if(isset($tags['description'])){
                //add two cells to the table.
                echo "<td>Description($line)</td>";
                echo "<td>{$tags['description']}</td>";
            } else {
                echo "<td>Description($line)</td>"
                echo "<td>No Meta Description</td>";
            }
            echo '</tr>';
    }
    echo "</table>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to put the id into the colorbox below this code nom works
I want put this two value together (Side by side), as following image, but
Suppose, I have very large foreach loop. I want put this loop into try
I have EuroCPCrap mapped as (j,0)(i,0) and want to put this into an array
I want put a value from front of the list into an another list
i have this <p class=comment_date title=a>c</p> <p class=comment_date title=b>b</p> i want put the title
I am struggling with an idea I want put into a python script. I'm
I have a page layout for my MOSS '07 site that I want put
Please help me for correcting this code,i want put if inside switch: switch ($urlcomecatid)
I've got a value type that I want put into a map. It has

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.