Welcome Guest, Not a member yet? Register   Sign In
Load function, not view
#5

[eluser]gtech[/eluser]
Code:
<?php
class Test extends Controller {
  function test() {
    parent::Controller();
  }
  function fish($var1="Nobody") {
    $var2 = "likes fish";
    $this->anotherfunc($var1,$var2);
  }
  function anotherfunc($var1,$var2)
  {  
    echo $var1." ".$var2;
  }
}
?>

Not sure I understand your question so I shall do a quick example see above..
it defaults to "Nobody likes fish"

if you call it with:

http://localhost/......./index.php/test/fish/Wilma

it will display "Wilma likes fish"

[edit]sorry missed your reply, glad you got it working


Messages In This Thread
Load function, not view - by El Forum - 11-16-2007, 08:43 AM
Load function, not view - by El Forum - 11-16-2007, 09:08 AM
Load function, not view - by El Forum - 11-16-2007, 09:26 AM
Load function, not view - by El Forum - 11-16-2007, 10:40 AM
Load function, not view - by El Forum - 11-16-2007, 10:43 AM
Load function, not view - by El Forum - 11-17-2007, 03:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB