![]() |
Class Properties with Prefixes - 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: Class Properties with Prefixes (/showthread.php?tid=23443) |
Class Properties with Prefixes - El Forum - 10-11-2009 [eluser]insub2[/eluser] I'mtrying to set up a Table Model so that I can change which tables I'm using for the whole application. I have a prefix on some of my tables so I'm trying to do this: Code: <?php But I get an error: Quote:Parse error: syntax error, unexpected T_VARIABLE in /home/insub2/Websites/CV_Test/system/application/models/table_model.php on line 8 Class Properties with Prefixes - El Forum - 10-11-2009 [eluser]steelaz[/eluser] You can't do that when declaring variables, add prefix in your constructor instead: Code: <?php Class Properties with Prefixes - El Forum - 10-11-2009 [eluser]insub2[/eluser] Thanks. But why is that? ...just curious. Class Properties with Prefixes - El Forum - 10-11-2009 [eluser]steelaz[/eluser] It's just how PHP works, it's not related to CodeIgniter. |