Created
June 13, 2014 15:21
-
-
Save Dianakc/de6cc48c442a501f0e78 to your computer and use it in GitHub Desktop.
Testa se há valor na chave de metadados
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function test_if_meta($arr, $key, $before = '', $after = '') { | |
if ($text = $arr[$key][0]) | |
return $before . $text . $after; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment