I have array such below:
$import_emails = [];
$import_emails[]=[
'to'=>$to,
'from'=>$from,
'cc'=>$cc,
'subject'=>$subject,
'text'=>$text,
'date'=> date('Y-m-d H:i:s',strtotime($date))
];
Example array data:
Array
(
[0] => Array
(
[to] => nastya.gorobets95@gmail.com
[from] => babboe1 babboe1 <test.babboe1@gmail.com>
[cc] =>
[subject] => Test Subject
[text] => Test content.
Please, write me later
Thanks!
[date] => 2017-06-29 18:04:53
)
[1] => Array
(
[to] => Anastasia Gorobets <nastya.gorobets95@gmail.com>
[from] => babboe1 babboe1 <test.babboe1@gmail.com>
[cc] => babboesignal@edu-crm.com
[subject] => Tema
[text] => Bla bla bla
Test email! :)
[date] => 2017-07-02 11:55:50
)
)
How can I check if value, for example 'nastya' exists in arrays item ['to'] ? Maybe there is some function for it? Thanks!