0
I need to check if the categories chosen by the user exist in the categories suggested by the php system
I was able to save in the array the categories chosen by the user and also categories suggested by the system.
foreach($array_id_categoria_escolhida as $value_as){
echo $value_as;
}
echo " ";
foreach($array_categoria_sugerida as $value_ass){
echo $value_ass;
}
How can I join these two foreach and check if the user has selected the categories suggested by the system?
array(2) { [0]=> string(1) "1" [1]=> string(1) "4" } the result was this
– Wagner Martins Bodyboard
in the test I did here was to return only one id_category, because in this case only one category is missing from the suggestion list
– Wagner Martins Bodyboard
the result of my foreach is thus chosen 214 suggested 1234
– Wagner Martins Bodyboard
in my example varri the array 'chosen' passing value by value of the array 'suggested', the values that were equal automatically he chose based on the dirt, and stored them in $res
– Felipe Duarte