• Resolved carrollga

    (@carrollga)


    Hi

    I love this plugin and it works great however I have the word array appearing at the top just before the start of my table ( https://keaneforfitness.com/) which is working perfectly apart form that here is the code I used:

    <?php echo $table = get_field( ‘timetable_data’ );

    if ( $table ) {

    echo ‘<table class=”tableMy table-responsive” >’;

    if ( $table[‘header’] ) {

    echo ‘<thead>’;

    echo ‘<tr>’;

    foreach ( $table[‘header’] as $th ) {

    echo ‘<th>’;
    echo $th[‘c’];
    echo ‘</th>’;
    }

    echo ‘</tr>’;

    echo ‘</thead>’;
    }

    echo ‘<tbody>’;

    foreach ( $table[‘body’] as $tr ) {

    echo ‘<tr>’;

    foreach ( $tr as $td ) {

    echo ‘<td>’;
    echo $td[‘c’];
    echo ‘</td>’;
    }

    echo ‘</tr>’;
    }

    echo ‘</tbody>’;

    echo ‘</table>’;
    }

    ?>

    Thanks
    In advance

    https://www.ads-software.com/plugins/advanced-custom-fields-table-field/

Viewing 1 replies (of 1 total)
  • Plugin Author Johann Heyne

    (@jonua)

    Line:
    echo $table = get_field( 'timetable_data' );
    should be…
    $table = get_field( 'timetable_data' );

    Thats all.
    Greetings, Johann

Viewing 1 replies (of 1 total)
  • The topic ‘The word array appears before my table’ is closed to new replies.