PHP 5 Check if Key Exist in Assoc Array
If you have an Array $kvarray of Pairs Key-Value and the Key is stored in the $key Variable you Check if it’s present in the Array’s Index by the function:
array_key_exists($key, $kvarray)
$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }