Php Check Array Size Javascript Substring Function In Oracle