|
我有2个表:product和cart,我希望结合这2个表并根据特定条件以数组形式显示数据,如下所示:9 f- f2 @9 o* _. X: o& Y
" C" M8 A! \4 W6 _' |
应显示特定类别下的所有产品,如果特定用户购买了给定产品中的任何产品,则其详细信息也应显示在该产品的前面$ |, d- x I2 b5 s
5 u" D, _/ m# Z/ g6 b- y+ s$ c
我到目前为止所做的代码是
7 Z& d z: |2 `- L! P, k- ^ q5 p$catid = $_REQUEST['catid'];
0 d- o, s) G' D% D& T1 d$userid = $_REQUEST['userid'];
( S/ C: k w. k. @9 n$sql = "select * from productsize where catid = '".$catid."' GROUP BY productid";
4 z! P& B$ D: |$ H' `$result = mysqli_query($con, $sql);
& L; a; ~9 y& \/ {8 Tif (mysqli_num_rows($result) > 0) ; \/ B7 K8 [+ s: l* L! [: C
{2 T& z5 t! s: k. e/ K/ G
while($row = mysqli_fetch_assoc($result)): W5 T5 G% a, ]
{ c7 _" P; m+ [, O
$rows['catid'] = $row['catid'];
: g' i7 U# q) X2 e% V& N $rows['catname'] = $row['catname'];
/ F s' a0 d" V" `' r5 B. E. ?: v $rows['productid'] = $row['productid'];
6 s h- ^6 u& Q6 d1 s% I5 O $rows['prodname'] = $row['prodname'];; o. I" v7 J0 r* c- ^2 |& w+ X
$rows['prodimg'] = $row['prodimg'];: `' @2 @ R2 D( o8 F) K
$row2[]=$rows;
% O# z& u1 ~8 F$ @3 K3 s# r }
0 b7 c+ T) P2 X/ b; d4 r+ k6 d }" s" g6 F4 R% h' Q& l+ ]
echo "";/ v6 ?6 O$ A' g' Z5 O/ p4 ]
print_r($row2);
( ?/ C. z2 i. B/ Lecho "";
7 }# w0 U4 ]7 T# J6 t它给出了这样的数组
8 `, Q- F3 m6 O; i3 P) ] Array( i4 M. a+ {7 S% M! M5 X
(# A [6 T. v2 c& i7 {
[0] => Array( l5 J: m5 h1 F( J& |' }( C5 A g) x
(
5 l% \* Y- S4 C [catid] => 2
/ ~: E# Y1 B# ~6 t/ Z [catname] => C1
U% @6 ^3 c0 V1 g+ J* H; y7 ]1 w [productid] => 13
' r+ U9 D5 {9 F$ G1 q& } [prodname] => P1
5 S G- t3 c0 p! `7 K- c h# W1 y [prodimg] => + a! Z$ r2 }% R
)3 w- X8 \: Z% N% c7 P. ?! P
[1] => Array! j. [; }7 P: ]
(8 ?; K1 E' h8 ^' _2 {0 G8 `; i
[catid] => 2+ F4 z: g6 ~2 b9 b. `' O1 G
[catname] => C1
9 w# _3 J+ b9 [. g! w' S8 O [productid] => 141 i0 P1 B+ }$ b" t2 v/ s# Q* c
[prodname] => P1. B, x! c: g, T. k4 A3 D
[prodimg] => 8 G, T( N5 {! G0 o- b6 ]
)
; i( l! R9 w" ` @) `% e; c [2] => Array0 [' y* m+ A5 X4 @& T
(0 U: z1 O, |6 u$ ~3 n
[catid] => 2
% J' C- ?* i( S7 N" z [catname] => C1# G( F: h9 c2 L4 \. K
[productid] => 152 [; D4 R, y0 x. P; k3 y
[prodname] => P34 p6 ?6 k! t( ~6 y1 g; H U7 q
[prodimg] =>
4 e( ?& A5 ?3 h8 b )
4 ~) a0 F* m2 C* G) ])
3 H# K x! q) v; v5 Z- T但是我想要代替上面的数组的最后一个数组是
/ j, `4 v& j* |& E5 bArray4 ~: J( |4 }- W. N2 B2 q
(
7 n4 a3 D. U) r1 F: m- i' H [0] => Array' P& J0 Y4 ^1 A- {$ S& F: M
(
( ^0 `9 p3 ]0 Q2 o3 L% n g/ r! l% f [catid] => 2
' K$ t) ^+ |% o# q7 o$ `: l# Y8 f [catname] => C19 z' K0 ]" p/ B# f8 v
[productid] => 13* y' Z9 n1 ]7 t+ X$ z+ p) x k
[prodname] => P15 X+ U! u: ?2 _) v; Z
[prodimg] =>
, @. x: ^. {6 r& o& m. T8 s+ k7 x [size] => Array* \, Q+ {( y% o
(/ F6 |7 C0 |) Q. ]& N0 C1 l
[0] => small
" g% P5 l4 q9 r! I. @' w7 H5 {# d [1] => medium1 X% [: R# G/ u7 O) Z) q- s ~
[2] => large, S. B$ H. J F" e, x" F' v; H
[3] => perpiece& `6 z) k( D$ x9 t3 Q
)
6 j5 s3 \$ ~8 g7 C) z [cost] => Array
; U/ U# T6 h& A (
5 J( W4 Q% d+ M: K/ t [0] => 10
) U# S5 H$ S% @, N+ n2 G [1] => 20! P6 H1 [2 H5 ^ j1 J9 [- d
[2] => 302 {! m0 o5 M7 i0 O% l9 W1 ]
[3] => 12/ |/ G" i' ]7 `/ y3 x: h+ V
)9 \# A, s! H! Z# J3 \; E/ M
[purchasedsize] => Array+ e- j, `3 q' {% U
(% a) o! O$ C, g6 b3 d
[0] => small
- b }- }6 l. s5 u$ S5 N( x [1] => 0
- n2 n( }! u3 r2 h3 h4 a1 l O [2] => large
! e' a# ^0 O7 F [3] => 0& `1 u* D. T5 K' h3 E) e v
)* v. z0 G* [% v" d& J5 @+ z3 a
[purchasedquantity] => Array+ z, [8 C: }9 l3 o9 {$ ~
(+ w" h' F2 x7 @" m! ?: ^, v4 n. d
[0] => 2
* X0 b6 Y( [ q: Q; \# t6 Y! B [1] => 06 T3 J6 ]: b& y) g( p. M
[2] => 1! ]% e: `0 A) i+ f! V( `
[3] => 07 U! @' e% X: D4 g3 _1 s
)# R* l9 j! t' y `( V2 V4 F( _
[userid] => 1
$ e; S! a8 k* q" g7 B6 C T )$ O+ N) j6 k; W* n6 y" W
[1] => Array0 A7 C3 \. K9 @9 s
(
! L! m4 _" B- W5 }0 x* n; ^ [catid] => 2* q4 T" ?- K+ V+ }. e
[catname] => C1/ }' y. ?# ^4 t" H: |
[productid] => 14+ s1 ~9 ~3 [! O! q/ D
[prodname] => P1
/ t& Q' `6 m. k8 j! R [prodimg] => $ N" \2 l5 R9 _) O' J6 l$ s
[size] => Array- q2 }7 ]3 v C2 V [; o" `
(
. E* _0 K2 C( C s0 E3 C, i [0] => small
* G$ G8 s# G% C. f% ~ [1] => medium
+ X% [& G0 k: j" l* y2 i [2] => large
# F2 s5 R$ L8 I. } [3] => 0! N1 }; U V. Y; b$ f
)9 Q& k$ L/ B. ?2 P/ [
[cost] => Array) {' b' R+ ~3 K3 w
(
6 `+ _1 Q ?$ P, ]: |0 I [0] => 154 S. ?8 x) I& L1 |" H6 W
[1] => 20
- _+ l" K: G; k1 Z [2] => 257 o" T) _( o+ ~2 z; ?
[3] => 0
. N. x" B9 r$ @$ R( h0 c; F )
+ m" ]" f: v( |7 Z% v, d [purchasedsize] => Array
: p& e' U4 c0 H0 v (
- f- ?' z6 z( ?% F! g4 G [0] => 0
- _; N0 D' W! L* n' S$ u: y3 D/ d# c [1] => medium4 f9 d, C( I& }5 M8 e, G
[2] => 09 s6 l; _9 ~4 F! U% c% A
[3] => 0- d% _ F/ K' K9 V
)2 g8 y" K) R- u8 X6 ~+ c$ E
[purchasedquantity] => Array
# _( I7 }, X! k0 O (+ z; J% d" n9 U6 \: a& E2 F
[0] => 04 S) F( C- ]1 V; R
[1] => 1+ }3 D- {" A- n- d1 ^1 X
[2] => 0
8 c0 H E' K" m# J- w [3] => 0* f: I* ^/ H+ m' h
)/ t- L2 V; I9 B. A
[userid] => 1
- K8 k8 J3 {/ ]+ H; r3 M8 M! k )
2 B1 T- ]+ O: j [2] => Array
8 o. I4 i! J$ } (! H+ q/ {) Q9 `9 ?. q2 F
[catid] => 2
% ?5 ?& y/ O& J [catname] => C1. G N! I0 a. h) F* d7 Y
[productid] => 15
0 i4 g2 l; ?# m [prodname] => P3( p& t: M, M7 }- L* ]
[prodimg] =>
7 H2 n2 t. h. n3 x [size] => Array6 G$ ?. X% Z) |' G% O# w4 q
(
7 g% @( V4 U/ h: ^6 f4 [7 d# \6 Z [0] => 0* v( z8 ^. r! Q* }; `
[1] => medium! v) M9 e% a; x& L/ z! y' l3 N
[2] => 0& ^) o8 I0 Y7 C9 \9 }
[3] => perpiece
/ j0 [. P+ g! Q4 s# |, K )5 @$ x6 g0 r( v" i
[cost] => Array
. m- G1 N9 ^! r8 c$ m; y4 W' P (
4 C* b5 V9 ?( _2 ]2 Z* k [0] => 0+ G8 k( X9 s( _" C
[1] => 20( o6 c& E6 @' ^ r
[2] => 0% p+ ?2 U6 O$ y: V2 V7 S
[3] => 18
" a! o, P1 M, s# m )
, F+ y9 `# e* W4 s0 { [purchasedsize] => Array
- t7 o8 f7 B! H' d H* e: h4 j (
7 v& }9 c1 t4 A+ F# L& @& W) @2 U& s [0] => 09 G3 d4 @5 H7 m, L0 ^5 I
[1] => 0
" l7 I$ D! m3 t l) h" G& o2 i9 K( o [2] => 06 `9 d% k$ `4 k" y D
[3] => 0
" Y9 D4 B1 w7 w! _ )
6 L% e/ M( r0 l- v- l [purchasedquantity] => Array" S- d! ]/ h" {+ y
(( G# @4 E( G% C2 H: x* v4 X
[0] => 0
5 S+ h% b; x% w! z) b$ _ [1] => 0
, R; k* G( H8 }3 Q; W0 i$ _9 Z [2] => 01 \ @5 h% a+ K$ Z9 C- p! O
[3] => 0, V7 s& n# v3 W1 z8 o1 N1 ^6 T) A
)# K" x% ~8 N5 o' t
[userid] => 0
: e* _8 i& r8 [+ p5 n) j8 r )
o$ T# G" u7 B0 }4 n, E9 q)/ K: ~$ ~8 Q/ z
产品表视图(如您所见,产品表中包含一个productid,在每个productid下最多可以有4个尺寸(不会超过4个))
, X2 p. m* @! T) y. p" V9 Mid catid catname productid prodsize cost prodname prodimg2 o/ D2 K1 M2 n" h+ ?
1 2 C1 13 small 10 P1
1 B! f: j" K" }: Q3 m( {2 2 C1 13 medium 20 P1' Y T/ k1 t8 i) c4 l0 n" ^, O, J
3 2 C1 13 large 30 P1
# r7 K: x/ v+ H/ k1 p" X3 y4 2 C1 13 perpiece 12 P1% Q+ [3 t3 N$ L& c5 I1 S. I, b0 o
5 2 C1 14 small 15 P21 P1 P+ Q9 y( r9 P
6 2 C1 14 medium 20 P2" } d6 A" R8 @; _/ o& d O" k
7 2 C1 14 large 25 P2
' ? I" i; G% p. u4 ]& P5 f8 2 C1 15 perpiece 18 P3
9 {$ k# m. x" i8 E3 t+ b: d R9 2 C1 15 medium 20 P3
" K& I% _2 C4 E) g- Q- r推车表的视图) L* Z5 H H" L4 i2 A
id catid catname userid productid prodname prodsize quantity prodcost4 }8 S0 m5 w& t
1 2 C1 1 13 P1 large 1 30
0 m2 V1 l. ?% x) b% C; G3 F2 2 C1 1 13 P1 small 2 10
, N/ p7 o9 P+ p3 2 C1 1 14 P2 medium 1 20
7 Z2 h9 v! `& r6 m2 v) D任何人都可以帮助我获得所需的数组结果吗?
0 y# h8 k. D. a # d# p3 h9 I! S. a; w" Q
解决方案:* h. U" T' q+ p) t6 H9 }2 }
* o, T) ]6 K! L+ N" P
: P7 N3 x! ^3 u8 z$ Y
" k7 R2 }0 b" _5 p4 s: J 试试这个; A+ {1 C8 |6 u0 \, l& b
$catid = $_REQUEST['catid'];. ~' v+ l+ A9 J4 ]5 ?: C
$userid = $_REQUEST['userid'];( U5 [* m0 u% O. O' U' ~. Z
$sql= "SELECT p.catid, p.catname, p.productid, p.prodimg,
, ~! e: \. x' K2 F GROUP_CONCAT(p.prodsize ORDER BY p.id ASC) as size, ( R1 y4 {/ o9 P# o% f: S
GROUP_CONCAT(p.cost ORDER BY p.id ASC) as cost, p.prodname,
( J3 a. K# h) K5 p GROUP_CONCAT(c.prodsize,'-',c.quantity) as cart_details, GROUP_CONCAT(DISTINCT(c.userid)) as user_id
- l% E+ o' A. x2 w7 m FROM products p* p/ M) s5 W( G. G \/ H
LEFT JOIN cart c ON(c.productid = p.productid AND c.userid = '$userid' AND p.prodsize = c.prodsize)
, N% n' g2 W8 v9 U9 F' r' p7 a7 y WHERE p.catid ='$catid'
7 o( q8 S9 k7 F& t7 x* L+ b7 w& v GROUP BY p.productid6 l0 K* }* f5 b* r
ORDER BY user_id DESC, p.productid ASC";. N) n" r# O9 W: M0 ?$ t$ c3 I
) f; U! e# _, }6 O6 g; c1 [$result = mysql_query($sql);" [7 _8 h# i0 X8 A! E
/ a0 Q9 a( k8 ~ j- I) d1 Sif (mysql_num_rows($result) > 0)
5 b4 e, x2 q! S/ _( ^; o+ ?+ ^ j/ X {
( }" i; S6 W% ^; Z# {. b8 Y $i = 0;
$ r) H) t4 ?# ~( [; H! r/ B4 S while($row = mysql_fetch_assoc($result))
' F4 [) K% \/ u, X {3 P$ T8 n( V3 C& Z9 {
$rows[$i]['catid'] = $row['catid'];: ^$ z" s' I* u! t
$rows[$i]['catname'] = $row['catname'];
2 V- L* u9 J: u( D2 i9 `5 O4 p $rows[$i]['productid'] = $row['productid'];
4 l4 y4 I; C- [, F, q+ F $rows[$i]['prodname'] = $row['prodname'];
+ k, W' Z: k: @) l $rows[$i]['prodimg'] = $row['prodimg'];9 }: B. V7 i3 j- i, W
$final_size = array_fill(0, 4, '0');
# V( A0 J) y, r( j/ R2 r+ o. g% ^ $final_cost = array_fill(0, 4, '0');
6 h u5 d5 k: l" I. y $size = explode(',', $row['size']);
. U# H* m+ B. U& c# [7 S $cost = explode(',', $row['cost']);) S. C$ x, y+ k/ g ]
foreach($size as $k=>$sizecol) {+ i$ Z3 V7 X2 x5 q# H! I* [# I7 h) E
switch($sizecol) {
: d9 \) ^" Q9 |& n$ L case 'small':9 c6 H2 l1 b! L; v7 \4 A% ]2 [
$array_key = '0';8 H4 r" n$ T" h- h; y( _* W) ]
break;' G6 [" V( ]( B+ K- i3 J" {
case 'medium':8 p( X" a& Q0 B |" f
$array_key = '1';' n' o# W+ c7 W5 a2 j
break;; s" W" V' {; k$ R2 f& y; z8 h
case 'large':
: K( X- L0 i5 \1 `! Y $array_key = '2';1 T* U, e, z6 K
break;
6 m% G6 G* l T5 g! t4 Y9 k case 'perpiece':& _7 K( h- K, ]1 S! u% q% h" t% M
$array_key = '3';: R& x) B, |6 W# U9 E
break;# X( w# ?" g: M W
}
& ~! W& h, j! W& ?6 i $final_size[$array_key] = $sizecol;
" o+ F7 g) K( c3 S $final_cost[$array_key] = $cost[$k];
6 S$ L- [% c) {% V# \3 F) I }
- O! ~9 v2 f3 g2 u' V
x$ P2 ^3 |5 Z* U$ N% U $cart_details = explode(',', $row['cart_details']);
8 B$ J H0 Q- t5 ^: ]* P8 U $purchasedsize = array_fill(0, 4, '0'); //Since you displayed this array has 4 values only
5 u0 D& _- ^ e; o! q, B $purchasedquantity = array_fill(0, 4, '0');
) \$ |8 l5 S' w- S6 M1 o7 ^ foreach($cart_details as $cart) {) D5 X, @1 c$ J
if($cart != '') {* I2 ^' M% K/ Z+ \/ b/ P" o3 y6 U
$details = explode('-', $cart);
# g& l( s, A, h# I8 Y: k1 h $key = array_search($details[0], $size);
+ ], A: H8 v/ w $purchasedsize[$key] = $details[0];
$ p, u% C4 |' U $purchasedquantity[$key] = $details[1];) D& A6 j _% K, W$ s& ]7 J: q' S
}
, Y: s9 o. x/ B7 S. X }
6 Q; |, k- T9 t7 `3 A; H9 l& H $rows[$i]['size'] = $final_size;
/ D3 K. s7 a) t! i; V; C( d$ M5 O1 U $rows[$i]['cost'] = $final_cost;
/ S a# x, k% U- X9 x $rows[$i]['purchasedsize'] = $purchasedsize;
0 {" F6 p( k' S2 i _2 }+ D) ^0 r $rows[$i]['purchasedquantity'] = $purchasedquantity;
" z6 z1 @- O- s9 N) { n $rows[$i]['userid'] = $row['user_id']; k9 }# [( C2 }+ M6 J6 s
$i++;% g! d" x/ X, `6 i0 z
}
, @+ A, F0 k( y5 v, i- L }
3 k' |0 r% l: \2 O+ V8 I9 Decho "";
- ^6 d% J# b! \: y/ hprint_r($rows);
2 X$ ]" H5 O! R. `6 O. ^" d echo "";
& w: ?8 N3 A! x( u) ?输出数组
# z3 m, y3 O( }$ G: E( gArray' O) d2 D ]" O, H, r O
(
# W/ a" u* E% v3 ]! W2 V[0] => Array+ O8 W( a# |" m( ?/ B
(6 a+ _8 u, B0 m9 e0 D/ w% _2 t: K
[catid] => 2
& L* r9 k/ h, Q/ Q [catname] => c1$ c) P, Z {+ F+ L/ B: D) z
[productid] => 13% n1 H( _8 A2 z/ p/ W2 e
[prodname] => P1
( ]9 E% ^( ]/ N0 @7 l/ Y% W t [prodimg] =>
1 O9 X1 t% @# K [size] => Array
, a( v( r3 x! n ( j8 L1 o$ A( i2 A" D- D
[0] => small
: i8 ^3 t9 p i# S6 O [1] => medium
- x* ]5 y. v, V I z# [6 x2 T# q [2] => large
, I/ R7 c5 I9 [* k [3] => perpiece5 o- q/ m1 p! B: I
)
% q1 H1 _ c, f; T1 K [cost] => Array) R0 f. p) [) C; g
(
8 A, j! z, Q3 v8 d6 h; J7 d [0] => 10
; m# m% N+ |8 q8 k [1] => 20
; O, e2 D X) ]" { [2] => 30
1 Y$ L) L0 c. P' z/ D! k [3] => 122 G5 {1 }$ s3 r2 E, E7 B
)% I4 f3 u2 x/ Z& ~& q
[purchasedsize] => Array0 { e; p* a. X5 Y- \( ?% s
(
* L* G8 D' m! L: ]: O7 `# f [0] => small
G2 F7 g# f$ e [1] => 0% A9 c. G% y( O! t8 u. ?: [6 z
[2] => large/ x9 w3 z V) {8 A* }! j7 I7 {1 O
[3] => 0
) V+ j1 ?; v# F )
! g/ \1 s: W" F' z [purchasedquantity] => Array* K: [. D! O# \' Z: Z' R( [
(% Z" t& f# [, q& i# W
[0] => 2
9 w; ?- s% V% i9 o4 `3 |* X [1] => 01 } J f/ \) M
[2] => 1
; m* A4 ~" P F% l* z+ ` [3] => 0' s+ V6 ]5 t; `. ~
)
Y9 h5 h/ t8 v; F9 J6 c [userid] => 15 d/ ]% l5 i% |6 R1 }% |
). v* L- j0 }0 z& v5 c5 a# p, O
[1] => Array
0 j+ X8 G. c: I/ Y/ N. v9 w) L/ u: S- k5 M (
; V7 r3 ` I8 {2 J2 N [catid] => 2' X# g8 v- z1 C7 @
[catname] => c1
. N1 x7 i& @; Z) n$ R [productid] => 14
. r6 @6 k3 G! F7 I% |$ m [prodname] => P2
: o* p/ @- w" @7 V/ o% D: {3 K6 ? [prodimg] =>
% Q1 y1 S6 a& I9 C" H [size] => Array, Y5 ^# [2 i o7 H0 v
(
+ n6 O5 Q# g4 Z4 z( k$ x+ w [0] => small8 w" x- J' M0 e9 R2 s' p& m
[1] => medium
9 B+ {7 `4 A, I$ i# ]9 s [2] => large! K6 b" A0 P- c9 U* h' F: ^' u( v3 A! L
[3] => 0
4 `) L2 i- T4 o ); _' Y- _9 C9 S! a
[cost] => Array2 t; J/ T$ d t) B5 O; j( i
(1 w) H7 K( Y1 g: k" _5 ]
[0] => 159 C q D: i$ n8 y# f
[1] => 202 E+ ^0 T/ A$ Y9 h# V4 }0 T
[2] => 25
& R, |1 l4 q( n; z/ k- y% \$ X6 Q$ g [3] => 0
9 H2 [! n% N' O% i )
3 t- Y* w! R4 N" V( ] [purchasedsize] => Array0 }6 j8 p. z: v4 h
(0 M- M% W2 I/ M
[0] => 0
9 r3 [8 N1 ?4 a2 m# o6 g4 o9 N: ]5 I! v [1] => medium2 J3 W2 x3 M! d( v- o+ \& y
[2] => 0 j+ I9 T" w+ G& c
[3] => 0
6 @. P( _, { j8 F5 D )- l/ k8 v3 W7 k& C5 F
[purchasedquantity] => Array# n6 t! }# O: n% Y
(
$ t9 ]8 J0 F$ q1 Z, R$ N [0] => 0
+ I& ]9 F- \1 W [1] => 1+ G r% h; N. m- S! ]( h- l. Y
[2] => 0
9 h. J% }( z T) @1 w3 e, ?. B [3] => 0
6 Y5 Z) N3 P$ d5 t )# \+ t: s6 p5 O7 {
[userid] => 1
) a* F- S! d% D( A/ n, |1 ` )
2 z4 X w6 C. e0 Z[2] => Array2 O+ n( h$ Q( P% z( B
(
4 c1 t6 F" o w$ H6 @1 l3 C [catid] => 2
- q' ^4 n+ w: U8 ` [catname] => C1
B/ g$ {9 q5 ?3 D+ ~* \ [productid] => 15
8 @: N, j3 M+ l, U [' i$ [ [prodname] => P3
/ ~: T+ c4 w }. i& | [prodimg] =>
5 g( p3 V" n/ ]& h' _ [size] => Array
# \4 C9 ?: ~! P; u6 N+ T, P8 L3 p (6 E3 |: P0 b/ i" Q S
[0] => 09 K; @, Q% I& \- s2 [+ ^9 Q# V
[1] => medium- e. J! }. m, E1 f" I
[2] => 0+ V4 k% L0 {# e
[3] => perpiece
. E, @7 A o. ]& T3 N2 a# W$ A6 } )
( Q( F( p6 S1 s [cost] => Array/ ]$ G4 u; ^- N3 A
(: W2 N7 R' n# e1 M* n q6 @2 g' x% S
[0] => 0
/ ^# x: v' P! Y" `7 L [1] => 20
O1 D" L9 y0 ]1 ^ [2] => 02 q2 x1 i2 q' }( b
[3] => 18$ o; H* P! R/ f/ _, \
)0 O' O$ k: j& s: M- S) t. E1 s
[purchasedsize] => Array
3 T [5 ~. s+ P. T8 w (
/ T. o# b. j# ^& r4 u [0] => 0/ Z5 B! y% O W: H2 o3 z
[1] => 0
. w% e! @0 o! ` [2] => 0! E6 V- H; p! r3 D8 L4 Y/ h
[3] => 04 S! ]5 C+ V; G0 ]
)3 a' c' U1 r) f- I' J9 I
[purchasedquantity] => Array
! H& O2 E: _* U5 N/ Y& h6 r# S9 w (( f- t C$ D, n+ z; B
[0] => 0
1 G: @. f; @7 M+ | [1] => 0- r# q- o! M; c
[2] => 0
0 t2 B* H) x5 y3 f [3] => 0
% E% g* ?# @' }: S$ I )* x/ J! S5 g# j: S% U# T2 b1 ^
[userid] => # H# I) [3 a7 E* V- o" G
)
3 \% W; E$ ]' J1 d! M) |
|