title: Codeigniter foreach . can't return values
body: <p>I have a code Like this</p>
  
  <pre><code>  function deletes2()
   {
  
     foreach ($_POST['selector'] as $id) 
     {
       $this-&gt;retailer_model-&gt;deletes($id);
     }
  
   }
  </code></pre>
  
  <p>Now i want to echo message like </p>
  
  <pre><code>echo"success"; or "error"
  </code></pre>
  
  <p>How can i do this??</p>