• Home
  • Blog
  • Lifestream
  • Me
  • Twitter

Recent Posts

  • » Google Car - Damn I'm Observant
  • » Travelling - What's Next?
  • » Posh East Perth Apartment
  • » House in Perth
  • » House Sitting in Adelaide
  • » Sailing The Whitsundays
  • » Agnes Water / 1770
  • » Fraser Island
  • » Coomera Springs and Noosa
  • » Byron Bay

Tags

  • 365  australia  code  experiences  explore  flickr  france  function  holiday  house  javascript  misc  movie  perth  photo  photography  photos  php  random  rant  review  ski  skiing  thailand  traveling  travelling  trekking  video  work 

Search


Links

  • » 365 Gallery
  • » Twitter
  • » Lifestream
  • » My Flickr

Archives

  • » January 2010 (1)
  • » November 2009 (2)
  • » August 2009 (2)
  • » June 2009 (2)
  • » May 2009 (5)
  • » April 2009 (6)
  • » March 2009 (4)
  • » February 2009 (1)
  • » January 2009 (2)
  • » December 2008 (3)
  • » November 2008 (2)
  • » October 2008 (2)
  • » September 2008 (5)
  • » August 2008 (3)
  • » July 2008 (1)
  • » June 2008 (2)
  • » April 2008 (10)
  • » March 2008 (7)
  • » February 2008 (5)
  • » January 2008 (9)
  • » December 2007 (2)

 RSS Feed

Search results for 'random'

Tania Holden

December 31st, 2008
Hey,

Just a quick update, noticed that people have been searching for a Tania Holden on my website, uh?? So to you guys searching for that... here is an entry, hope you like it!

In other news, Christmas came and went, it's new years eve today, I'm laying in bed, tired. Exciting stuff eh!

Sorry about this post, I promise I'll try and write something useful next time!
No Comments »

Random Strings and Comparing Arrays - A Rant

January 16th, 2008
Again people amaze me with just how thick they can be. Basically I want to create a random string 8 characters long, a bit of google bashing gives me functions that are like 20 - 100 lines long, why people? why? here is my fabtabulous (and far better than yours) script for achieving this.
function random_string($length=8){
	$charset = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','X','Z','0','1','2','3','4','5','6','7','8','9','0');
	$chars = array_rand($charset,$length);
	foreach ($chars as $a=>$value){
		$key.= $charset[$value];
	}
	return $key;
}

See how easy it is people! Love you really

And while i'm ranting about stuff... comparing 2 multidimensional arrays, hello php? bah.. here's my very simple solution!
function array_compare($array1,$array2){
	return (md5(serialize($array1)) == md5(serialize($array2))) ? true : false;
}
No Comments »
.
 
Twitter   |   Contact “everything should be made as simple as possible, but no simpler ” - Albert Einstein