how to store isset condition php to avoid repetition
<p>my code:</p>

<pre><code>if (isset($dayMarks[$res['resId']][$dDate])) {
     $var=$dayMarks[$res['resId']][$dDate];
     echo $var;
}
</code></pre>

<p>note that the isset condition is identical to the value assigned to $var, which creates a pretty ugly code.</p>

<p>How is it possible to assign the condition to $var without repeating it?</p>

<p>(in javascript, I'd write <code>if (var=$dayMarks[$re...)</code>  )</p>
