You are here

2 October 2012

Creating range array where key and the value is the same number. I am using array_combine function for that. I give two parameters which are the same array created by range.

Source code viewer
  1. $range = range(1,10);
  2. $result = array_combine($range, $range);
Programming Language: PHP