Home › Forums › Add-ons › Repeater Field › Display repeater from options page › Reply To: Display repeater from options page
Oh, sorry if I was not answer completely. I just understand now. (I need more practice in english hehe)
Ok, you can play with your PHP like that, but know, you have in fact, multiple ways:
(I supose you have your date in the format you give me. Let’s me know if it’s a timestamp.)
<?php
if(have_rows("gesloten", "option")){
echo '<table style="width: 100%;">';
echo '<tbody>';
while(have_rows("gesloten", "option")) : the_row();
$birthDayName = get_sub_field("feestdag");
$startDate = get_sub_field("datum");
$endDate = !empty(get_sub_field("eind-datum")) ? ' - ' . get_sub_field("eind-datum") : null;
$startToEndDate = $startDate . $endDate;
echo '<tr>';
echo '<td>'. $birthDayName .'</td>';
echo '<td>'. $startToEndDate .'</td>';
echo '</tr>';
endwhile;
echo '</tbody>';
echo '</table>';
}
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.