13: How to get the sum of PHP array values - PHP 7 tutorial

preview_player
Показать описание
How would you get the sum of PHP array values - Learn PHP Array Programming. Today's tutorial is demonstration of calculating the sum of a PHP array. There is also demonstration of how to calculate the average number in a PHP array

/** How to code well programming courses */

/** How to code well podcast */

/** Support the show */

/** Become a channel member */

/** Follow */

Disclaimer: Links included in this description might be affiliate links. If you purchase a product or service with links that I provide I may receive a small commission. There is no additional charge to you.

Thank you for supporting How to code well
Рекомендации по теме
Комментарии
Автор

array_reduce is also a good fit you can use it to apply any function and return a single result

bluescanfly
Автор

how to make the same thing but it takes prices from database?

kerel
Автор

I have coulum in mysql has number
i used get id to give me how is in this id
then=>
sql="select sum(coulumName) from (tableName) where id='$id' ";
this will give me some records
i need to sum of these records
how to see it in page

babo_web_developer
join shbcf.ru