Builder and PHP question

Hello, I’m starting to discern some logic in Php, but…
I still don’t master the order of arguments for example:
I’ve got a builder snippet call quote and I want to output the quote div only if it has content. Can you help me to resolve this code, thanks

<?php foreach($page->builder()->toBuilderBlocks() as $block): ?>
  <?php if($block->quote()->isNotEmpty()): ?>
  <div id="citation" class="col-6">
      <div class="citation">
      <?= $block->citation(); ?>
      <?= $block->auteur(); ?>
      </div>
  <?php endif ?></div>
<?php endforeach ?>

You would better do that in the block snippet. The quote is a block type, so you cannot check if that is empty or not, you want to check if the field(s) inside this block are empty.

then something like <?php if($block->quote()->citation()->isNotEmpty()): ?> but it’s not working for me

No, please post your quote snippet.

Sorry, with <?php if($block->citation()->isNotEmpty()): ?> it’s working, I had it wrong with my closing div. Site making is like mecanics and sudoku together.