Support

Account

Home Forums Front-end Issues Repeater Returning Type boolean instead of Array Reply To: Repeater Returning Type boolean instead of Array

  • Seems like the get_field(‘repeating_content’) function is returning a boolean value instead of an array. Maybe you can check if the field exists and if it’s returning the expected value.

    $repeating_content = get_field(‘repeating_content’);

    // Check if $repeating_content is an array before counting its rows
    if (is_array($repeating_content)) {
    $numrows = count($repeating_content);
    echo “Number of rows: $numrows”;
    } else {
    echo “Error: Unable to retrieve repeating content.”;
    }