Guest User

Untitled

a guest
Oct 15th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. //asumiendo que campo es un campo de formulario de tipo array
  3. foreach($_POST as $k1 => $v1) {
  4. if($k1 === 'campo' && is_array($v1)) {
  5. foreach($campo as $k2 => $v2) {
  6. $this->form_validation->set_rules('campo['.$k2.']', 'campo'.$k2, 'required');
  7. }
  8. }
  9. }
Add Comment
Please, Sign In to add comment