function bt_r_entry_article($arr) { $fields = array("title", "journal", "volume", "pages", "year"); $first = true; $pf = ""; $out = ""; foreach ($fields as $f) { if (!isset($arr[$f]) || empty($arr[$f])) { continue; } if (!$first && $pf != "author") { $out .= ", "; } if ($f == $fields[0]) { $first = false; $pf = $f; } if ($f == "title" && isset($arr["url"]) && !empty($arr["url"])) { $out .= bt_r_frm($f, $arr, $arr["url"]); } else { $out .= bt_r_frm($f, $arr); } } return $out; }
function bt_r_entry_article($arr) { $fields = array("author", "journal", "volume", "pages", "year", "url"); $first = true; $out = ""; foreach ($fields as $f) { if (!isset($arr[$f]) || trim($arr[$f]) == "") { continue; } if (!$first && $f != "author") { $out .= ", "; } if ($f == $fields[0]) { $first = false; } $out .= bt_r_frm($f, $arr); } return $out; }