but I'm not sure how your doing your
sequential outputs, or how you are calling pass.
Yeah, that's the problem, and I think it maybe the limitation of
CakePHP or in general  MVC frameworks.
In actual, we can't get the desired output since we can't do the
sequential outputs, call pass().


On 1 3 ,   5 35 , "TJSingleton" <[EMAIL PROTECTED]>
wrote:
This gives the desired output, but I'm not sure how your doing your
sequential outputs, or how you are calling pass.

VIEW:
<?php
echo $heading;
$count = count($results);
foreach ($results as $result) {
     echo "$result<br />";}?>

CONTROLLER:
<?php
class TestsController extends AppController {
  var $name = 'Tests';

  function pass($i) {
    $this->set('results', $this->Test->myfunction($i));

      $i += -1;
      switch($i)
     {
        case 0:
            $heading = 'Header 1: Fruits are here. <br />';
            break;
        case 1:
            $heading = 'Header 2: Animals are here. <br />';
            break;
        case 2:
            $heading = 'Header 3: Colors are here. <br />';
            break;
     }
    $this->set('heading', $heading);
  }

}?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to