function bind($orig,$b,$wanted){
    $result = array($b);
    foreach($wanted as $k => $field){
      if(isset($orig[$field])&&strlen("".$orig[$field])){
        $result[$field] = $orig[$field];
      }else{
        $result[$field] = null;
      }
    }
    return $result;
  }