A question concerning Tychonoff spaces $X$ is a Tychonoff space (or a $T_{3\frac{1}{2}}$-space) iff it is $T_1$ and for every point $x\in X$ and a closed set $A$ not containing $x$ there is a continuous function $f\colon S\to[0,1]$ such that $f(x)=0$ and $f[A]=\{1\}$.
Is it true that if $X$ is Tychonoff space, then for a point $x$ such that $f(x)=0$ and closed $A\neq\emptyset$ without $x$ such that $f[A]=\{1\}$ and $f$ continuous, the family $f^{-1}\left[[0,r)\right]$ is a local basis for $x$? In the sense that for every $V$ open in $S$ and containg $x$ there is a real numer $r$ such that $f^{-1}[[0,r)]\subseteq V$.
If this fails in general for all Tychonoff spaces, is it true for connected Tychonoff spaces? If still not, what condition(s) does $X$ have to satisfy in order to guarantee this?
 A: For the first version (without $A$) I made a comment that 
for the constant function $f=0$, we have $X=f^{-1}[[0,r)]$ for every $r>0$, 
hence $\{f^{-1}[[0,r)]:r>0\}$ is not a basis at $x$ (unless $X=\{x\}$, a singleton). 
For the revised version, the case is not much different. You could find a closed $B$ disjoint from $A$ (you mean $x\not\in A\not=\emptyset$, I assume) such that $x$ is contained in the interior of $B$. If $X$ is also normal, then we could find continuous $f$ with $f[B]=\{0\}$ 
(and $f[A]=\{1\}$), and again $\{f^{-1}[[0,r)]:r>0\}$ cannot be a basis at $x$ since $B\subseteq f^{-1}[[0,r)]$ for each $r>0$. (We need not assume that $X$ is normal. Say, $f$ is any continuous function with $f(x)=0$ and $f[A]=\{1\}$, where $x\not\in A$ and $A$ is closed. As long as there is $p\in X\setminus A$, with $p\not=x$, then we may find continuous $g$ with $g(p)=0$ and $g[A]=\{1\}$ (also assuming, if we wish, that $0\le f(y)\le 1$ and $0\le g(y)\le 1$ for all $y\in X$). Then $h(y)=f(y)\cdot g(y)$ would, just like $f$, have the properties that $h(x)=0$ and $h[A]=\{1\}$, but, nevertheless, $\{h^{-1}[[0,r)]:r>0\}$ cannot be a basis at $x$, as $\{x,p\}\subseteq h^{-1}[[0,r)]$ for all $r>0$.) 
I think your question might be better stated in the following form. 
For a Tychonoff space $X$ and a point $x$, does there exists a suitable continuous $f$ such that $\{f^{-1}[[0,r)]:r>0\}$ is a basis at $x$? 
In this form, a necessary condition is that $X$ is first countable at $x$, 
by which I mean that there is a countable local basis (of open sets) at $x$. 
Indeed, if $\{f^{-1}[[0,r)]:r>0\}$ is a basis at $x$ then so is 
$\{f^{-1}[[0,\frac1n)]:n=1,2,3,...\}$, and the latter family is countable. 
It seems that first countable is also a sufficient condition. Indeed, let $\{U_n:n=1,2,3,...\}$ be a countable local basis at $x$, then $C_n=X\setminus U_n$ is a closed set missing $x$ and there is a continuous $f_n$ such that 
$f_n(x)=0$ and $f_n[C_n]=\{1\}$ (and $0\le f(y)\le 1$ for all $y\in X$). You could define $f(y)=\sum_{n=1}^\infty \frac{f_n(y)}{2^n}$ and verify that it works (i.e., that $\{f^{-1}[[0,r)]:r>0\}$ is a basis at $x$, use that $f^{-1}[[0,\frac1{2^n})]\cap C_n=\emptyset$).  
