Posts tagged ‘Array’

January 27th, 2012

PHP Array Flip – Array Value Key Flip

PHP example that you can use to flip the values and keys in an array. Essentially all the values will become keys and all the keys will become values.

<php

$sampleArray = array(0=>”one”, 1=>”two”, 2=>”three”);

$flipedArray = array_flip($sampleArray);

endphp>

April 25th, 2011

Array Unique Tool – Removes duplicate values from an array online

ArrayThis is hopefully one of the many online array tools that I am going to publish. In my work I deal with arrays on daily basis. Therefore I have decided to create a simple page where you can manipulate an array in any way I can think of. I am presenting to you the first tool called “Array Unique Tool”. The link is  http://erunways.com/online-array-tools/. Enjoy and let me know if you have any suggestions what so ever.