<?php

// combine strings to generate separate lines.
// if the string is empty or holds '0' then ignore that line
// -- useful for formating addresses with empty lines
function LineImplode0()
{
	$arr = func_get_args();
	$oper = array_shift($arr);
	$sarr = array();
	foreach($arr as $v)
	{
		$v = trim(str_replace('&nbsp;',' ',$v));
		if ((trim($v)))
			$sarr[] = trim($v);
	}
	$s = implode($oper,$sarr);
	return (strlen($s)) ? $s : '&nbsp;';
}

//print LineImplode(',','abc','','def','hij');
?>
