我已获得此代码
if ( !empty( $ImStoreCart->cart->items ) {
$count = $ImStoreCart->cart->items;
echo "Items in Basket: ". $count;
} else { echo "Your shopping basket is empty."; }
但我收到此错误:解析错误:语法错误,意外' {'
我已经检查了代码,但无法理解为什么它无法看到需要{
的if语句有什么想法吗?
答案 0 :(得分:0)
第一行错过了“)”
if ( !empty( $ImStoreCart->cart->items )) {
$count = $ImStoreCart->cart->items;
echo "Items in Basket: ". $count;
} else { echo "Your shopping basket is empty."; }