Posts

Showing posts from September, 2009
function unique_random_numbers($count_of_random_numbers) { $rage_factor=2; $count_of_random_numbers = 4; $array_of_unique_random_numbers=array(); while(count($array_of_unique_random_numbers) { $random_number=mt_rand(0, $rage_factor*$count_of_random_numbers); $array_of_unique_random_numbers[] = $random_number; $array_of_unique_random_numbers = array_unique($array_of_unique_random_numbers); } return $array_of_unique_random_numbers; }

rotate an array values by using index in PHP

// here $array is the one you want to rotate function array_pop_index($array, $index) { if( ( $index = 0)) { $value_at_the_index = $array[$index]; $_2d_array = array_chunk($array, ($index+1) ); $resulting_array = array(); for($i=0; $i { if($i==0) { array_pop($_2d_array[0]); } $resulting_array=array_merge( $resulting_array, $_2d_array[$i] ); } return $resulting_array; } else { return; } } ?>

Easily and freely control multiple computers running any number of operating systems from one computer

click here for more details Download here

unregister a session in PHP(in oop structure)

public function Unregister($key) { unset($this->mSession[$key]); } in here session_start(); $this->mSession = &$_SESSION;