How to pass variable only if it is set in php
<p>I use <strong>CodeIgniter</strong> form helper. I only want to pass the <code>$incident-&gt;street_id</code> variable if it is set. I don't want to use if so is there any way to reduce to one line probably cause it will just be a clutter if I use if else. </p>

<pre><code>echo form_dropdown(
    'street',
    $streets,
    $incident-&gt;street_id,
    'class="form-control required"'
);
</code></pre>