Suppose I have an array of data contacts,
$cont = array("123-123-123"," sample@sample.com ");
What I saved in the symfony2 doctrine field as json_array type
$person->setContacts($cont);
Now my problem is that when searching for a person by contact
$cont['contacts'] = array("123-123-123"," sample@sample.com "); or $cont['contacts'] = json_encode(array("123-123-123"," sample@sample.com ")); $person->findBy($cont);
It does not give the correct result, is there any other method for retrieving data in the json_array field, sorry if the question is too simple.
json php symfony doctrine2
senK
source share