All snippets of the tag array |
|
1-6 of 6 Entries |
|
|
is_array (Perl::Array) |
Created by Marko Schulz at 2010-01-20 14:17:28 |
# **************************************************************
# This function check if the reference is an ARRAY.
#
# @see: http://affy.blogspot.com/p5be/ch08.htm
# @example: print "ERROR: A ARRAY is needed\n" if ( !is_array(\@$array) );
sub is... |
|
in_array (Perl::Array) |
Created by Marko Schulz at 2010-01-20 14:11:54 |
print "OK\n" if ( &in_array( "b", ( "a", "b", "c" ) ) );
# *************************************
# Checks if a value exists in an array and
# return the searched expression.
sub in_array {
my ( $needle, @haystack ) = @_;
return grep{ $_ eq $nee... |
|
array_space (Perl::Array) |
Created by Marko Schulz at 2010-01-20 14:11:20 |
# **************************************
# fill out space between array entrys...
@num = (1..5);
print array_space( '|', @num ); # 1|2|3|4|5
sub array_space {
my ($sep, @temp)=@_;
my $str;
if ( $#temp>0 ) {
foreach my $tmp( @temp... |
|
array.inc.sh (Bash::Library) |
Created by Marko Schulz at 2010-01-20 14:05:27 |
# *********************************************************
# file: array.inc.sh
# date: 08.10.2004
# author: (c) by Marko Schulz - <info@tuxnet24.de>
# description: Little array library for bash.
# **********************************************... |
|
msort (PHP::Function) |
Created by Marko Schulz at 2010-01-20 13:38:08 |
/*******************************************************************
* This function sort a multi dimensional array by key, order, type.
*
* @param array &$data referenz of a multi dimensional array
* @param string $keys sort by key name
* @par... |
|
mysql_fetch_all (PHP::Snippets) |
Created by Marko Schulz at 2010-01-20 12:49:49 |
// ************************************************************
// array mysql_fetch_all( query:resource [, type:string (default:'assoc' | 'row')] )
function mysql_fetch_all( $query, $type = 'assoc' ) {
(array) $result = array();
(string) $type = $... |
|
1-6 of 6 Entries |
|
|