Elegant alternative to if statements to output variables in PHP
<p>Looking for an elegant approach in PHP to take in a variable and then output two preset values. </p>

<p>Instead of using a series of if statements like below, wondering if there is a more elegant solution.</p>

<p>Example:</p>

<pre><code>if ($edit_array[1] == job) {
$table = 'jobs'; $id = 'job_id';
}
</code></pre>
