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.

array_unique

The array_unique() function in PHP takes an array and filters our any duplicates values, returning the array with only unique values present.

PHP

$elements = array('php', 'ruby', 'perl', 'php');
array_unique($elements);
print_r($elements);
/*
Array (
	[0] => php
	[1] => ruby
	[2] => perl
)
*/

Ruby

elements = [ "php", "ruby", "perl", "php" ];
puts elements.uniq;
# => ["php", "ruby", "perl"]
By | 2009-10-19T08:55:30+00:00 October 10th, 2009|Categories: PHP, Ruby|Tags: , , , , |Comments Off on array_unique

About the Author: