-2

I've got this code

        if ( !empty( $ImStoreCart->cart->items ) {
        $count = $ImStoreCart->cart->items;
        echo "Items in Basket: ". $count;
    } else { echo "Your shopping basket is empty."; }

but I get this error: Parse error: syntax error, unexpected '{'

I've checked the code but cannot see why its failing to see the if statement that needs the {

Any ideas?

1 Answers1

0

It was ")" missed in first line

if ( !empty( $ImStoreCart->cart->items )) {
    $count = $ImStoreCart->cart->items;
    echo "Items in Basket: ". $count;
} else { echo "Your shopping basket is empty."; }
Mihir Bhatt
  • 3,019
  • 2
  • 37
  • 41