Suppose $\phi({\bf x},{\bf z})$ is a continuous function of two arguments,

$\phi: {\mathbb R}^N \times Z \rightarrow {\mathbb R}$,

where $Z \subset {\mathbb R}^m$ is a (non-empty) compact convex set. Further assume that $\phi({\bf x},{\bf z})$ is convex in ${\bf x}$ for every ${\bf z} \in Z$.

Is the function $f({\bf x}) = \max_{{\bf z} \in Z} \phi({\bf x},{\bf z})$ continuous? For sure it is convex, but what about continuity?

I think one can appeal to the so-called Danskin's theorem to answer this, but I am not sure.