Php Array Check If Index Exists Sql Example Problems In Conversion