Parser library, variable scope.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Parser library, variable scope.. (/showthread.php?tid=30231) |
Parser library, variable scope.. - El Forum - 05-07-2010 [eluser]imamiscool[/eluser] Today I realize that my view always went wrong because I had two variable: first is scalar, the last is array. the last variable contains variable with same name with the first variable. for example: In controller: Code: //...... controller In view: Code: <table> Lets say, the value of the first 'industry_id' (after the word "Industry ID:") is '20', then the combo box (select box)'s industry_id will be replaced with '20' too.. anyone ever face with this problem? just share my thought, the problem was solved by changing the combobox's industry_id name into something else like '_industry_id' to differs with the first 'industry_id', ps. sorry my english. *edited Parser library, variable scope.. - El Forum - 05-08-2010 [eluser]Tominator[/eluser] Hi man! It's because pseudo-variable replacing is before cycles. I've made my own Template Parser, whitch is correct + providing more functions. Take a look: [url="http://parser.comper.sk/en/"]http://parser.comper.sk/en/[/url] or [url="http://ellislab.com/forums/viewthread/153269/"]http://ellislab.com/forums/viewthread/153269/[/url] |