$foo = array();$foo []= 'bar';if ( ! empty($candy)) $foo []= $candy;$does->nothing = join(';', $foo);