How to Ckeck if a PHP Array is Empty?
How to Check if an Array Contain No Data?
To Check if an Array is Empty we can Use the PHP Function empty():
empty($array)
Return True if the Array is Empty, else Return False.
$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }