Checking If A Data Set Is Set When A Value Is NULL
When setting a field in a MySQL database to be NULL by default you may run into NULL values in your dataset when querying the database. You cannot simply check if a variable is set using the isset() function in PHP because it returns false for NULL values. To remedy this issue you can use the array_key_exists(‘key’, $dataset) to check if the key exists in the array.
Good to know!
