Long story short. Our Wordpress imports data via xml and here is the PHP code to view the output:
<?php
// check if the flexible content field has rows of data
if( have_rows('epigenetics', 'user_'.get_current_user_id()) ):
// loop through the rows of data
while ( have_rows('epigenetics', 'user_'.get_current_user_id()) ) : the_row();
the_sub_field('category');
the_sub_field('item_name');
the_sub_field('value');
the_sub_field('status');
//add more field you desire here
endwhile;
else :
// no layouts found
endif;
?>
Unfortunately, the data imported is unpresentable, I was wondering if there is a way to have the PHP output for "the sub fields" in a table format such as the one below.
<table style="border-color: #396833; border-width: 1px; width: 90%; border-style: solid; background-color: #fefefe;" border="1" cellspacing="3" cellpadding="2" align="center">
<tbody>
<tr>
<td style="text-align: center;">
<p><span style="font-size: medium;">Category</span></p>
</td>
</tr>
<tr>
<td style="background-color: #92c38e; text-align: center;">
<p><span style="color: #ffffff; font-size: medium;">Item</span></p>
</td>
</tr>
<tr class="tablerow1">
<td style="text-align: center; background-color: #92c38e;">
<p><span style="font-size: medium; color: #ffffff;">Value</span></p>
</td>
</tr>
<tr class="tablerow1">
<td style="background-color: #92c38e; text-align: center;">
<p><span style="color: #ffffff; font-size: medium;">Status</span></p>
</td>
</tr>
</tbody>
</table>
So, in other words, I need the correct way to insert the PHP in the HTML table.