Hello
can someone please explain me what does this line: -
$sum = array_sum(array_map(‘intval’, $_POST[‘php’]));
mean?
i used it to add values of radio buttons. and its working. just wanna know how it works… 8)
Thanks
phphp
Hello
can someone please explain me what does this line: -
$sum = array_sum(array_map(‘intval’, $_POST[‘php’]));
mean?
i used it to add values of radio buttons. and its working. just wanna know how it works… 8)
Thanks
phphp
The best that I come up with, is array_map ensures that $_POST[‘php’] data is retained as an integer ( it being an integer with intval function) and that array_sum adds the values of the those values (radio buttons).
Thank you so much for help i understand now.