Showing/hiding content in a template based on ACF checkboxes

Guys I may be dull but I’m trying to make this work for multiple days.

 

I have ACF form for post submission. After submitting the form, a post is created with ACF fields displayed within the template.

 

**But one thing I still struggle with.** **I have a checkbox ACF field. Based on which checkboxes are ticked, I want to display specific table.**

If the box is not selected, the table should not be displayed on the frontend (in the post).

 

https://preview.redd.it/r6j7h37ntj3d1.png?width=836&format=png&auto=webp&s=1ed0d86ea694ed919565be83ae8aa0dfc183ca3a

There must be easy way to achieve this, but neither of the <php if> I found on the internet didn’t work for me. It either results in critical error on the website, or doesn’t work.

 

I’m using conditions already in a way that if ACF field is left empty, part of the content is hidden in the post. But this one I’m still fighting with.

 

Does anyone have any examples please?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer