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.

shuffle

Randomizes the order of the elements in an array.

PHP

$a = array('a', 'b', 'c', 'd');
shuffle($a);
print_r($a);
/*
Array (
	[0] => d
	[1] => b
	[2] => c
	[3] => a
)
*/

Ruby

a = [ "a", "b", "c", "d" ];
puts a.sort_by{ rand };
# => ["d", "b", "c", "a"]
By | 2009-05-21T16:29:35+00:00 May 26th, 2009|Categories: PHP, Ruby|Tags: , , , , |Comments Off on shuffle

About the Author: