fork(2) download
  1. <?php
  2.  
  3. $regras = array(
  4. 'field' => 'cpf',
  5. 'label' => 'CPF',
  6. 'rules' => 'required'
  7. ),
  8. 'field' => 'senha',
  9. 'label' => 'SENHA',
  10. 'rules' => 'required|trim'
  11. ),
  12. );
  13. print_r($regras);
  14.  
  15. $regras[] = array(
  16. 'field' => 'nome',
  17. 'label' => 'NOME',
  18. 'rules' => 'required|trim'
  19. );
  20. print_r($regras);
Success #stdin #stdout 0s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [field] => cpf
            [label] => CPF
            [rules] => required
        )

    [1] => Array
        (
            [field] => senha
            [label] => SENHA
            [rules] => required|trim
        )

)
Array
(
    [0] => Array
        (
            [field] => cpf
            [label] => CPF
            [rules] => required
        )

    [1] => Array
        (
            [field] => senha
            [label] => SENHA
            [rules] => required|trim
        )

    [2] => Array
        (
            [field] => nome
            [label] => NOME
            [rules] => required|trim
        )

)