A set PHP functions that I found useful during my code life
Just copy paste
array buildInsertValues(string $table, array $fieldss, array $data)
Creates an array with the built 'sql' query, the 'vars' to the query and a 'debug' version of the query
array arrayFilterRecursive(array $array)
Returns an array without empty fields nor empty arrays
array fixArrayKeyForJsonRecursive(array $array[, array $ignore = array() ])
Returns an array without empty fields nor empty arrays