I am trying to create a 2-dimensional array, reading specific values from a (large) met file. The arrays are empty and I dont know why.
I have the following array:

$varmet = array('tasmax', 'tasmin', 'pr', 'clt');

I have two loops: 

The first is 

for ($j = 0; $j &lt;= 3; $j++)  {
...


I read the corresponding files and variables, etc. It works properly.

Then I have the other loop

for ($i = 1; $i &lt;= 360; $i++) {
....
$valor = $valor * $correctp;


It works perfectly, retrieving the required value in $valor

The problem arise when I want to store the value in a different array, according to the met variable:

switch ($j) {
case 0: 
   $tmax[$i] = $valor;
break;
case 1: 
   $tmin[$i] = $valor;
break;
case 2: 
   $prec[] = $valor;
break;
case 3: 
   $clt[$i] = $valor;
break; } // Fin del switch

    }  // Fin del for para un fichero met
} // Fin del for para todas las varmet


The $tmax, $tmin, etc. have no value, although $valor does have. Furthermore, if I assign the array within the loop (i.e. $valorest[$j][$i] = $valor) it still have the values, but not outside it.

Anybody knows what I am doing wrong?


Question: Keep rainmeter from minimizing
Answer: Try right clicking on the gadget and choosing "always on top", whilst it means it goes on all windows, it does mean that it will stay there when you click the button to go to desktop or hover on it.

Apart from this, gadgets should always be visible when the desktop is shown even if the "always on top" option is not selected, so if it is not visible - it is probably an error in the gadget.