Try like this

$tmax = array(); //declare this outside the loop i.e before the loop starts


In switch case statement, replace the below line 

$tmax[$i] = $valor;


with

array_push($tmax,$valor);


Cant retrieve PHP arrays outside the assigning loop
If $f_n$ is a sequence of functions over $[0, \pi/2]$ given by

$$f_n(x) = \frac {nx} {1+n\sin(x)},$$

then how would I go about proving that $f_n$ does not converge uniformly to a function $f$ on $[0, \pi/2]$?
