Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    A loop field is just an array of arrays. Just iterate through it like any other array.

    $loop = CFS()->get( 'my_loop_field' );
    foreach ( $loop as $row ) {
        if ( ! empty ( $row['live'] ) ) {
            echo $row['my_other_field'];
        }
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Conditional statement in loop’ is closed to new replies.