Please help me i have a problem on for loop

how to make for loop i wanna count data such as 100users 1000users 2000users to databases

Your question is a bit unclear.

Can you post some code, or an example of what you’ve tried?


It’s still not clear, but a a for loop is done using “foreach()”.

    <?php foreach ($todo as $item): ?>
  • <?= $item ?>
  • <?php endforeach; ?>

If you want to count the number of found records, use “count()”

// In a controller or table method.
$query = $articles->find(‘all’, [
‘conditions’ => [‘Articles.title LIKE’ => ‘%Ovens%’]
$number = $query->count();