0
기본적으로 어떤 제품이 가장 많이 주문되었는지 확인한 다음 상위 5 'post_id'의 배열을 반환해야합니다.복잡한 PHP 배열 논리
Array
(
[1] => Array
(
[post_id] => 1
[post_ident] => macbook_pro
[post_name] => Macbook Pro
[post_parent_ident] => rings
[post_cat_ident] => default
[post_module_ident] => store
[post_price] => 999.00
[post_currency] => EUR
[item_link] => index.php?module=store&show=post&category=default&parent=rings&post=macbook_pro
[qty] => 1
)
)
Array
(
[1] => Array
(
[post_id] => 1
[post_ident] => macbook_pro
[post_name] => Macbook Pro
[post_parent_ident] => rings
[post_cat_ident] => default
[post_module_ident] => store
[post_price] => 999.00
[post_currency] => EUR
[item_link] => index.php?module=store&show=post&category=default&parent=rings&post=macbook_pro
[qty] => 1
)
)
Array
(
[1] => Array
(
[post_id] => 1
[post_ident] => macbook_pro
[post_name] => Macbook Pro
[post_parent_ident] => rings
[post_cat_ident] => default
[post_module_ident] => store
[post_price] => 999.00
[post_currency] => EUR
[item_link] => index.php?module=store&show=post&category=default&parent=rings&post=macbook_pro
[qty] => 1
)
)
어떻게 가장 배열에있는 제품을 확인할 수 있습니다
이 제품의 세부 사항을 포함하는 다른 순서의 배열입니다?
예를 들어 post_id 1 인 제품은 배열에 3 번 있습니다. 어떻게 계산합니까, 다음 post_id 배열의 첫 번째 항목으로 반환 할?
해당 배열은 SQL에서 제공됩니까? – thirtydot
아니요, 제품 세부 정보가 일련 번호로 표시되며 이는 비 직렬화 후의 출력입니다. – tmartin314