Hi guys,
I accidently inserted " " into one column in mysql database. Column has one char length space as it is expected after insertion. However, in php code, I can not do this:
None of these returns Yes.
if(substr($data, 0, 1) == " "){
echo "Yes";
}
if(substr($data, 0, 1) == " "){
echo "Yes";
}
if(substr($data, 0, 1) == ""){
echo "Yes";
}
Only this return Yes. This is not efficient because any of a,b,c,t,w,g,u,o,h ... could be yes as well.
if(is_string(substr($data, 0, 1))){
echo "Yes";
}
Please help
Thanks in advance