Php Check String For Substring Javascript