PHP help

Hello :slight_smile:

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 :smiley:
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 :slight_smile: i understand now.

Sponsor our Newsletter | Privacy Policy | Terms of Service