php - How to show the input as a list?
Get the solution ↓↓↓I have these checklists https://pasteboard.co/J4PepFI.png . how can I show all of them as a list. its only showing the first input. https://pasteboard.co/J4PfgFl.png
$origins = get_term_meta( $tagid, 'origin_s', true );
<div class="mt15 ingredient-center-icon">
<ul><li><?php echo do_shortcode($origins);?></li></ul>
</div>
Answer
Solution:
try this...
$origins = get_term_meta( $tagid, 'origin_s', false ); ?>
<div class="mt15 ingredient-center-icon">
//check if array has any items
<?php if ( !empty( $origins ) ) : ?>
<ul>
<?php foreach ( $origins as $origin ) : ?>
<li><?php echo do_shortcode( $origin ); ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: xmlhttprequest error flutter
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.