I am trying to compare two strings
if they have a same value.
$userP = $userProduct->getProduct();
$userC = $this->get('security.context')->getToken()->getUser()->getProduct();
I want to compare these two in two different array and want compare if userC
has any value that is in userP
.
How can I put them in array and can compare them?