title: How to select from mysql array text and compare
body: <p>I am collecting user selected "text" as array in mysql using PDO connection from php form there are let suppose 3 check boxes with names
  1- Apple
  2- Banana
  3- Cherry</p>
  
  <blockquote>
    <p>In DB stored values are as per shown 
    apple,banana,cherry</p>
    
    <p>What i want : I want to display "Apple" users in certain "/offer.php" page
    while i am using SELECT query and it's not working i am using pure php mvc framwork.</p>
    
    <p>In Controller i done this</p>
  </blockquote>
  
  <pre><code>public function offer(){    
  $this-&gt;view-&gt;title = User Selection;
  $this-&gt;view-&gt;offerUser = $this-&gt;model-&gt;offerUser();
  $this-&gt;view-&gt;render('dashboard/offer');
  }
  </code></pre>
  
  <blockquote>
    <p>In Model I done this</p>
  </blockquote>
  
  <pre><code>public function offerUser()
  {
  return $this-&gt;db-&gt;select('SELECT * FROM users WHERE selection = apple ORDER BY points DESC ');
  }
  </code></pre>
  
  <blockquote>
    <p>In View i done this</p>
  </blockquote>
  
  <pre><code>&lt;?php
  foreach($this-&gt;offerUser as $key =&gt; $value) {?&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;&lt;strong&gt;&lt;?php echo $value['selection']?&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <blockquote>
    <p>The issue is i am not able to select "Text" from stored array with model and even not able to display selection in "View" user end page.</p>
  </blockquote>
  
  <p>This code format was working fine with single numeric digit selection or compare but failed with text array.</p>
  
  <p>Please help me out with this i really appreciate this i am new with text array fetching.</p>
  
  <p>Hope someone answer my question soon....</p>
  
  <p>Regards,
  james</p>