Category | CakePHP functions - compact |
Code Examples | This is php function: example: What does the compact() function do? It takes the array you pass into it and looks for variables of the same name as the elements in that array. It then spits out an array of key => value pairs. So, one little trick with compact() means you only have to use one set statement. This works because all those $this->set() statements simply add those values to an array. |
Test Code | |
Links | |
Remarks | |
Cancel |