Typescript Type Last Element Of Array Php Functions For Mysql