[ask]Controller: doing other function in a function. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: [ask]Controller: doing other function in a function. (/showthread.php?tid=4973) |
[ask]Controller: doing other function in a function. - El Forum - 12-28-2007 [eluser]metaltapimenye[/eluser] hey guys.. i need yer help here i need to doing a function inside a function i've made.. Code: <?php maybe little-bit shallow.. but i got no one to ask. thx n_n [ask]Controller: doing other function in a function. - El Forum - 12-28-2007 [eluser]xwero[/eluser] Each function or variable in a class can be called by using $this-> so your code would be Code: class Example extends Controller { [ask]Controller: doing other function in a function. - El Forum - 12-28-2007 [eluser]Grahack[/eluser] Same question here, with same answers + the 'private' trick. [ask]Controller: doing other function in a function. - El Forum - 01-02-2008 [eluser]metaltapimenye[/eluser] [quote author="xwero" date="1198855394"]Each function or variable in a class can be called by using $this-> so your code would be Code: class Example extends Controller { well lets say sometimes some methods oftenly not as simplier as sum $varA & $varB.. or sometimes i just want to get some $data['part'] stuff.. thx xwero, i hvn't try it yet.. but it just a kind of answer that i expected. @Grahack: thx, but my nerves getting tense up when reading 'library' stuff..>_< |