I have a function to send mail to users and I want to pass one of its parameter as an array of ids.
Is this possible to do? If yes, how can it be done?
Suppose w
Yes, you can do that.
function sendemail($id_list,$userid){ foreach($id_list as $id) { printf("$id\n"); // Will run twice, once outputting id1, then id2 } } $idl = Array("id1", "id2"); $uid = "userID"; sendemail($idl, $uid);