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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:05:29+00:00 2026-06-17T22:05:29+00:00

With the code below: ‘<ul class=qandaul><li>’.htmlspecialchars( is_array( $arrImageFile[$key] ) ? implode(,, $arrImageFile[$key]) : $arrImageFile[$key]

  • 0

With the code below:

'<ul class="qandaul"><li>'.htmlspecialchars( is_array( $arrImageFile[$key] ) ? implode(",", $arrImageFile[$key]) : $arrImageFile[$key] ) ). '</li></ul>'

When I go on the view page source, it highlights in red </li></ul>, the reason it does this is because it it not displaying the <ul><li> start tags to associate with them. My question is with code above, where am I suppsoe to place the <ul><li> tags so that it shows up in view source meaning I know the tags are placed in the correct posistion?

UPDATE:

Below is the generated HTML from view source:

<td width="11%" class="imagetd">&nbsp;</li></ul></td>

Below is the php/html code in full:

echo '<td width="11%" class="imagetd">'. ( ( empty ($arrImageFile[$key]) ) ? "&nbsp;" : '<ul class="qandaul"><li>'.htmlspecialchars( is_array( $arrImageFile[$key] ) ? implode(",", $arrImageFile[$key]) : $arrImageFile[$key] ) ). '</li></ul></td>' . PHP_EOL;
  • 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-17T22:05:31+00:00Added an answer on June 17, 2026 at 10:05 pm

    Some of your parentheses fall short somewhere, but it’s just easier to rewrite it like this; not everything should be a one-liner after all and especially nested ternary operators:

    echo '<td width="11%" class="imagetd">';
    if (empty($arrImageFile[$key])) {
        echo '&nbsp;';
    } else {
        echo '<ul class="qandaul"><li>';
        echo htmlspecialchars(is_array($arrImageFile[$key]) ? implode(",", $arrImageFile[$key]) : $arrImageFile[$key]);
        echo '</li></ul>';
    }
    echo '</td>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code below is working well as long as I have class ClassSameAssembly in same
The code below fails on the line: Class.forName(oracle.jdbc.driver.OracleDriver); with the error: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver The
Code below defines a ChargeCustomer class that contains an array of type customers. I
Code below is pseudo code. Imagine a class Fruit which has a factory method
The code below consists of two classes : SmartForm (simple model class) SmartForms (plural
The code below should display the content of the page followed by certain page
Code below works great with aspx view engine, i am trying to convert it
The code below asks to input the numbers two times. public class Palindrome {
The code below work like this: http://www.website.com/?page=home will pull content from http://www.website.com/home.php -- or
Code below is used to save PostgreSql database backup from browser in Apache Mono

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.