Hi i have a member array and then i have a pic array, what i am trying to do is delete
every member that does not have a pic.
I have already isolated both into their own arrays. Now what i need to do is compare the two arrays.
The rule is if the user id does not exist in the pic array then delete the whole user profile.
This is what i have so far.
PHP Code:
// $arrayful is the array of all the members in the system
// $arrayb is the array of all the members with pics
// i want to compare both arrays and those members that do not have pics
// need to be deleted from system.
---arrayful looks like this--
Array
(
[0] => stdClass Object
(
[mem_userid] => 247
)
---arrayb looks like this--
Array
(
[0] => stdClass Object
(
[pic_userid] => 263
[adv_userid] => 263
[adv_sex] => F
[adv_approved] => 1
[adv_paused] => N
)
i want to compare mem_userid to adv_userid and here is what im trying to do in order to get a final array of who i should delete
this resulting array is everyone who needs to be deleted and i will run it thru a loop to delete them.
PHP Code:
$result_delwho = array_diff($arrayful, $arrayb);
here is the error i get,
Catchable fatal error: Object of class stdClass could not be converted to string
do i need to use [] ?
Thanks.