I am using an array for selecting the column in Excel. Right now I need A
through CZ
, but it might need to expand to a larger set in the future. I'm hoping that someone has a faster or better way than what I'm currently doing this.
Here is what I'm doing now:
$ColumnArray2 = 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');
$ColumnArray = array();
for($x = 0 ; $x <= 25 ; $x++)
{
$ColumnArray[] = $ColumnArray2[$x];
}
for($x = 0 ; $x <= 4 ; $x++)
{
for($y = 0 ; $y <= 25 ; $y++)
{
$ColumnArray[] = $ColumnArray2[$x].$ColumnArray2[$y];
}
}
This gives me an array with 155 values going from A
to EZ
.
Is there a better way to accomplish this?