What would be the best way to write this block of PHP instead of listing each number??
<?php $name1 = get_post_meta(get_the_ID(), 'ch_client_name1', TRUE);
$name2 = get_post_meta(get_the_ID(), 'ch_client_name2', TRUE);
$name3 = get_post_meta(get_the_ID(), 'ch_client_name3', TRUE);
$name4 = get_post_meta(get_the_ID(), 'ch_client_name4', TRUE);
$name5 = get_post_meta(get_the_ID(), 'ch_client_name5', TRUE);
?>
And here is the HTML that I will be using.
So I will want the list to display each of the 5 names.
<li id="<?php the_ID(); ?>" ">
<?php echo $name1; ?>
</li>
You can do like it: