Answers for "php addition of int in array"

PHP
1

sum of the array elements in php

Return the sum of all the values in the array (5+15+25):

<?php
$a=array(5,15,25);
echo array_sum($a);
?>
Posted by: Guest on June-29-2020
1

addition in php

<?php  
$x=15;  
$y=30;  
$z=$x+$y;  
echo "Sum: ",$z;  
?>
Posted by: Guest on May-03-2020

Browse Popular Code Answers by Language