(T_ENDFOREACH) php error
<p>Creating a wordpress website and I'm getting the following php error:
<em>Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH) in /home/soralmedia/public_html/wp-content/themes/Soral Media/woocommerce/myaccount/my-orders.php on line 98</em></p>

<p>Here's the code for the file:</p>

<pre><code>    &lt;?php
/**
 * My Orders
 *
 * Shows recent orders on the account page.
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-orders.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
 * will need to copy the new files to your theme to maintain compatibility. We try to do this.
 * as little as possible, but it does happen. When this occurs the version of the template file will.
 * be bumped and the readme will list any important changes.
 *
 * @see     http://docs.woothemes.com/document/template-structure/
 * @author  WooThemes
 * @package WooCommerce/Templates
 * @version 2.5.0
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

$my_orders_columns = apply_filters( 'woocommerce_my_account_my_orders_columns', array(
    'order-number'  =&gt; esc_html__( 'Order', 'burst' ),
    'order-date'    =&gt; esc_html__( 'Date', 'burst' ),
    'order-status'  =&gt; esc_html__( 'Status', 'burst' ),
    'order-total'   =&gt; esc_html__( 'Total', 'burst' ),
    'order-actions' =&gt; '&amp;nbsp;',
) );

$customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array(
    'numberposts' =&gt; $order_count,
    'meta_key'    =&gt; '_customer_user',
    'meta_value'  =&gt; get_current_user_id(),
    'post_type'   =&gt; wc_get_order_types( 'view-orders' ),
    'post_status' =&gt; array_keys( wc_get_order_statuses() )
) ) );

if ( $customer_orders ) : ?&gt;

    &lt;h2&gt;&lt;?php echo apply_filters( 'woocommerce_my_account_my_orders_title', esc_html__( 'Recent Orders', 'burst' ) ); ?&gt;&lt;/h2&gt;

    &lt;table class="shop_table my_account_orders"&gt;

        &lt;thead&gt;
            &lt;tr&gt;
                &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                    &lt;th class="&lt;?php echo esc_attr( $column_id ); ?&gt;"&gt;&lt;span class="nobr"&gt;&lt;?php echo esc_html( $column_name ); ?&gt;&lt;/span&gt;&lt;/th&gt;
                &lt;?php endforeach; ?&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;

        &lt;tbody&gt;&lt;?php
            foreach ( $customer_orders as $customer_order ) {
                $order = wc_get_order( $customer_order );
                $item_count = $order-&gt;get_item_count();

                ?&gt;              
                &lt;tr class="order"&gt;
                    &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                        &lt;td class="&lt;?php echo esc_attr( $column_id ); ?&gt;" data-title="&lt;?php echo esc_attr( $column_name ); ?&gt;"&gt;
                            &lt;?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?&gt;
                                &lt;?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?&gt;

                            &lt;?php elseif ( 'order-number' === $column_id ) : ?&gt;
                                &lt;a href="&lt;?php echo esc_url( $order-&gt;get_view_order_url() ); ?&gt;"&gt;
                                    #&lt;?php echo esc_html($order-&gt;get_order_number()); ?&gt;
                                &lt;/a&gt;

                            &lt;?php elseif ( 'order-date' === $column_id ) : ?&gt;
                                &lt;time datetime="&lt;?php echo esc_html(date( 'Y-m-d', strtotime( $order-&gt;order_date ) )); ?&gt;" title="&lt;?php echo esc_attr( strtotime( $order-&gt;order_date ) ); ?&gt;"&gt;&lt;?php echo date_i18n( get_option( 'date_format' ), strtotime( $order-&gt;order_date ) ); ?&gt;&lt;/time&gt;

                            &lt;?php elseif ( 'order-status' === $column_id ) : ?&gt;
                                &lt;?php echo wc_get_order_status_name( $order-&gt;get_status() ); ?&gt;

                            &lt;?php elseif ( 'order-total' === $column_id ) : ?&gt;
                                &lt;?php echo sprintf( _n( '%s for %s item', '%s for %s items', $item_count, 'burst' ), $order-&gt;get_formatted_order_total(), $item_count ); ?&gt;

                            &lt;?php elseif ( 'order-actions' === $column_id ) : ?&gt;
                                &lt;?php
                                    $actions = array(
                                        'pay'    =&gt; array(
                                            'url'  =&gt; $order-&gt;get_checkout_payment_url(),
                                            'name' =&gt; esc_html__( 'Pay', 'burst' )
                                        ),
                                        'view'   =&gt; array(
                                            'url'  =&gt; $order-&gt;get_view_order_url(),
                                            'name' =&gt; esc_html__( 'View', 'burst' )
                                        ),
                                        'cancel' =&gt; array(
                                            'url'  =&gt; $order-&gt;get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
                                            'name' =&gt; esc_html__( 'Cancel', 'burst' )
                                        )
                                    );

                                    if ( in_array( $order-&gt;get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'failed' ), $order ) ) ) {
                                        unset( $actions['pay'] );
                                    }

                                    if ( ! in_array( $order-&gt;get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) {
                                        unset( $actions['cancel'] );
                                    }

                                    if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
                                        foreach ( $actions as $key =&gt; $action ) {
                                            echo '&lt;a href="' . esc_url( $action['url'] ) . '" class="qbutton small ' . sanitize_html_class( $key ) . '"&gt;' . esc_html( $action['name'] ) . '&lt;/a&gt;';
                                        }
                                    }
                                ?&gt;
                            &lt;?php endif; ?&gt;
                        &lt;/td&gt;
                    &lt;?php endforeach; ?&gt;
                &lt;/tr&gt;
            &lt;?php endforeach; ?&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;
&lt;?php endif; ?&gt;
</code></pre>