Randomize array values
<?php
/**
* function randomArray (array $array)
*
* Randomize array values
*
* Example:
*
* $array = array(‘value1′,’value2′,’value3′,’value4’);
*
* $random = randomArray($array);
*
* retu
<?php
/**
* function randomArray (array $array)
*
* Randomize array values
*
* Example:
*
* $array = array(‘value1′,’value2′,’value3′,’value4’);
*
* $random = randomArray($array);
*
* retu
<?php
/**
* function humanSize (integer $size)
*
* Receive the file size in bytes and return the human readable value (B, KB, MB)
*
* Example:
*
* echo humanSize(filesize(__FILE__));
*
* ret
<?php
// @param $string A string value to be trimmmed.
// @param $length The max. visible length with added dots. If the string is longer, the remaining part will be trimmed. (Default is 15)
// @pa
[url=http://wisnercanoes.com/node/2]Example[/url]
<?php
/*
* This script makes a list of content for each month and puts the current month first, and then lists the months coming up.
* It i
This snippet requires a 3rd party service to work.
It will take your url, such as: http://phpsnips.com
and convert it to a shorter URL such as:
http://m8.to/BA
<?php
$long_url = "http://www.
<?php
function array_repeated($array){
if (!is_array($array))
return false;
$repeated_values = Array();
$array_unique = array_unique($array);
if (count($array) – count($array_unique)
<?php
function romanNumerals($num){
$n = intval($num);
$res = ”;
/*** roman_numerals array ***/
$roman_numerals = array(
‘M’ => 1000,
‘CM’ => 900,
‘D’ => 500,
‘CD’ => 400,
Please delete cuz i haven’t finished the code yet
File: class_auth.php
<?php
/*
#
# Copyright Iulian Ciobanu (CIGraphics) 2009
# Email: cigraphics@gmail.com
# Please leave the copyright and email intact.
#
# DATABASE TABLE:
CREATE TAB
<?php
function to_link($string){
return preg_replace("~(http|https|ftp|ftps)://(.*?)(\s|\n|[,.?!](\s|\n)|$)~", ‘<a href="$1://$2">$1://$2</a>$3’,$string);
}
$html = ‘This line of text has three