PHP Take a Variable in an If statement literally
<p>I was wondering if it would be possible to do this:</p>

<pre><code>$var = '$something == $somethingelse';

if ($var) { // Say hello }
</code></pre>

<p>and have it mean the same thing as this:</p>

<pre><code>if ($something == $somethingelse) { // Say hello }
</code></pre>

<p>I know this will not work at the moment, because <code>if ($var)</code> checks to see if <code>$var</code> is set or not. But what I'm asking is: is there a method to allow this? Would appreciate an answer.</p>

<p>EDIT:
Basically I feel I should explain why I am doing this.
I want users to be able to control when they get a notification, based off some data that one of their "channels" has saved.</p>

<p>For instance, a user only wants to get a notification when their collected data is bigger than 60. So I would get them to choose two fields:</p>

<p>First field input of their number (int or float)</p>

<p>Second field choises (equals, &lt;, &gt;, =&lt;, =&gt;)</p>

<p>The last thing in this if statement would be their data collected by their "channel".</p>

<p>I then want to be able to save their choice in a database, somehow, and then later act upon their choices.</p>
