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.
25 10, 2009

array_reverse

By | 2009-11-16T14:46:56+00:00 October 25th, 2009|Categories: PHP, Ruby|Tags: , , |Comments Off on array_reverse

The array_reverse() function in PHP reverses the order of the elements in an array.

PHP

$a = array('php', 'ruby', 'java');
$results = array_reverse($a);
print_r($results);
/*
Array (
	[0] => 'java'
	[1] => 'ruby'
	[2] => 'php'
)
*/

To replicate this functionality in Ruby, we can use the reverse method of the Array object.

Ruby

a = [ "php", "ruby", "java" ];
p a.reverse;
# => ["java", "ruby", "php"]