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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:19:00+00:00 2026-06-17T20:19:00+00:00

My image links are each suppose to be displayed in bullet points. Problem is

  • 0

My image links are each suppose to be displayed in bullet points. Problem is that it is displaying only one bullet points for all image links, rather than displaying a bullet point for each image link. What am I doing wrong in my php/html?

<table id="tableqanda" cellpadding="0" cellspacing="0">
    <thead>
    <tr>
        <th width="11%" class="image">Image</th>
    </tr>
    </thead>
    </table>
    <div id="tableqanda_onthefly_container">
    <table id="tableqanda_onthefly" cellpadding="0" cellspacing="0">
    <tbody>
    <?php

                function CreateLink($filename, $type){
 if($type == 'image'){
  return '<a href="previewimage.php?filename='.$filename.'" title="Click to view in New window" target="_blank">'.htmlspecialchars($filename).'</a>';
 }
}

          foreach ($arrQuestionId as $key=>$question) {
        echo '<tr class="tableqandarow">'.PHP_EOL;
        //start:procedure
        $img_result = '';
        if(empty($arrImageFile[$key])){
          $img_result = '&nbsp;';
        }else{
          $img_result .=  '<ul class="qandaul"><li>';
           if(is_array( $arrImageFile[$key] )){
            foreach($arrImageFile[$key] as $filename){
             $img_result.= CreateLink($filename, "image");
            }
           }else{
            $img_result.= CreateLink($arrImageFile[$key], "image");
           }
           $img_result.= '</li></ul>';
        }
        //end:procedure

        echo '<td width="11%" class="imagetd">'.$img_result.'</td>' . PHP_EOL;
        echo '</tr>'.PHP_EOL;

}

?>
    </tbody>
    </table>
    </div>

Screenshot showing what it looks like at moment:

enter image description here

  • 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-17T20:19:01+00:00Added an answer on June 17, 2026 at 8:19 pm

    You probably want every link to be in a <li> tag:

    Replace:

    $img_result.= CreateLink($filename, "image");
    

    With:

    $img_result.= '<li>' . CreateLink($filename, "image") . '</li>;
    // the other places where you use that function as well...
    

    And make sure the list only starts and ends with the <ul> tag (not the additional <li>)

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

Sidebar

Related Questions

Change all links that have an image in it to: javascript(alert(thehref)); eg. <a href=/galleries/anna-leah-111827/image01.html><img
I have more than 5000 image links and I need to find a way
I'm trying to extract all of the links to image files from a text
If I go to www.example.com which has an image on the page that links
NOTE : My problem is NOT that my links are not being replaced. But,
I have 4 divs with class v_block . Each one has 2 links with
I'm wondering how I could have a JavaScript image rotator/slideshow, that each time it
I have a binary image with contour lines and need to purify each contour
I want to place links over a background image (set in CSS) and I
I have an image, and then a series of links. The hover works 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.