Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/04/2015, 12:32
Gothgauss
 
Fecha de Ingreso: marzo-2009
Mensajes: 395
Antigüedad: 15 años, 1 mes
Puntos: 11
Extraer de un array

Buenas,

quiero extraer de un array el siguiente valor:
Código:
[itemCount:Jcart:private] => 18 )
Para ello he puesto

Código:
echo $jcart["itemCount"];

pero me devuelve el siguiente errro:
[code]
fatal error: Cannot use object of type Jcart as array in /home/paloaltosunglass/public_html/jcart-1.3/jcart/jcart.php on line 267

[code]

La verdad es que nunca había visto un array con : entre medias.

Tb he probado con

Código:
echo $jcart["itemCount:Jcart:private"];
pero nada.

Os dejo lo que me devuelve al hacer un print_r al array jcart

Código:
Jcart Object ( [config] => Array ( [jcartPath] => jcart/ [checkoutPath] => checkout.php [item] => Array ( [id] => my-item-id [name] => my-item-name [price] => my-item-price [qty] => my-item-qty [url] => my-item-url [add] => my-add-button ) [paypal] => Array ( [id] => [email protected] [https] => 1 [sandbox] => [returnUrl] => [notifyUrl] => ) [currencyCode] => USD [csrfToken] => [text] => Array ( [cartTitle] => Shopping Cart [singleItem] => Item [multipleItems] => Items [subtotal] => Subtotal [update] => update [checkout] => checkout [checkoutPaypal] => Checkout with PayPal [removeLink] => remove [emptyButton] => empty [emptyMessage] => Your cart is empty! [itemAdded] => Item added! [priceError] => Invalid price format! [quantityError] => Item quantities must be whole numbers! [checkoutError] => Your order could not be processed! ) [button] => Array ( [checkout] => [paypal] => [update] => [empty] => ) [tooltip] => 1 [decimalQtys] => [decimalPlaces] => 1 [priceFormat] => Array ( [decimals] => 2 [dec_point] => . [thousands_sep] => , ) ) [items:Jcart:private] => Array ( [0] => ABC-123 [1] => 2 ) [names:Jcart:private] => Array ( [ABC-123] => Soccer Ball [2] => Baseball Mitt ) [prices:Jcart:private] => Array ( [ABC-123] => 25.00 [2] => 19.50 ) [qtys:Jcart:private] => Array ( [ABC-123] => 16 [2] => 2 ) [urls:Jcart:private] => Array ( [ABC-123] => [2] => http://yahoo.com ) [subtotal:Jcart:private] => 439 [itemCount:Jcart:private] => 18 )
Gracias!!!