- var_dump: documentation ( source)
<?php
$show_data = [];
function checkVal($val, &$show_data){
return empty($show_data[$val]) ? "" : $val;
}
$show_insert = array(
'title' => checkVal('title',$show_data),
'thetvdb_id' => checkVal('tvdbid',$show_data)
);
var_dump($show_insert);