Php Array Append Array Javascript Length Method In Sql