I have the following variable $rows:
Array (
[0] => stdClass Object
(
[product_sku] => PCH20
)
[1] => stdClass Object
(
[product_sku] => PCH20
)
[2] => stdClass Object
(
[product_sku] => PCH19
)
[3] => stdClass Object
(
[product_sku] => PCH19
)
)
I need to create second array $second containing only unique values:
Array (
[0] => stdClass Object
(
[product_sku] => PCH20
)
[1] => stdClass Object
(
[product_sku] => PCH19
)
)
But when i run array_unique on $rows, i receive:
Catchable fatal error: Object of class stdClass could not be
converted to string on line 191
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…