CakePHP - DropDown loop


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. foreach ($dropDowns as $model => $conditions) {
  2. if (is_numeric($model)) {
  3. $model = $conditions;
  4. $conditions = array();
  5. }
  6. $this->set(Inflector::variable(Inflector::pluralize($model)), $this->Transaction->{$model}->generateList($conditions));
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.