function is_in_table( mytable , value ) found = false for i = 1 , table.getn(mytable) do if mytable[i] == value then found = true end end return found end