This is problem $1$, Section $3$, page $252$ of Dugundji's book.
Let $X$ be a completely regular space, $C \subset X$ compact and $U$ an open set containing $C$. Prove there exists a continuous map $f: X \rightarrow [0,1]$ such that $f(c)=0$ for all $c \in C$ and $f(x)=1$ for all $x \in Y \setminus U$.
So the hint is: For each $c \in C$, let $f_{c}$ be such that $f_{c}(c)=0$ and $f_{c}(X \setminus U)=1$, cover $C$ by finitely many sets $\{f_{c_{i}}^{-1}([0,1/2)): i =1,2,..,n\}$ and consider the product $f_{c_{1}}(x)f_{c_{2}}(x)...f_{c_{n}}(x)$.
My question is: the product won't work right? take $z \in C$ then $z \in f_{c_{i}}^{-1}([0,1/2)$, so that $f_{c_{i}}(z) \in [0,1/2)$, but there's no guarantee that $z$ must be one of the c_{i}'s so that we need somehow to modify the function. Can we take the minimum of $\{f_{c_{1}}(x),...,f_{c_{n}}(x)\}$ and then re-scale the function?