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
$result = array_unique($array, SORT_REGULAR);
– Jaye