This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.
17 02, 2010

array_product

By | 2010-02-17T11:38:14+00:00 February 17th, 2010|Categories: PHP, Ruby|Tags: , , |Comments Off on array_product

The array_product() PHP function returns the product of all values in an array. In other words, it multiplies all values in the array together, and returns the result as a number.

PHP

$a = array('1', '2', '3');
$product_total = array_product($a);
echo $product_total;
// => 6 

Ruby

a = [ "1", "2", "3" ];
product_total = a.inject {|product, element| product * element }
puts product_total;
# => 6