im trying to create a save inside a for but the variable $i is not incremented
$i=0;
$many=8;
for($i<$many)
{
    $people=new People();
    $people->number=$i;
    $people->save();
    $i=$i+1;
}|  | May '14 | 6 | 631 | 0 | 
the thing is that im trying to save for example 8 times $i but just doit once that's it and i dont understand why
please help me
si sabes español porfavor ayudeme y me explica en español
el problema es que estoy intentando guardar la variable $i 8 veces como en el ejemplo pero solo lo hace una vez y se sale del for o while
con ninguno me funciona
Intenta esto:
    public function testAction()
    {
        $i = 0;
        $many = 8;
        while ($i < $many) { // es 'while' no 'for' 
            $people = new People();
            $people->nombre = $i; //asignar cada campo con un valor
            $people->apellido = $i; //asignar cada campo con un valor
            if (!$people->save()) { // esto muestra si hay mensajes de validacion
                foreach ($people->getMessages() as $message) {
                    echo $message;
                }
            }
            $i++; //asi se incrementa en php
        }
    }La tabla:
CREATE TABLE `people` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(30) NOT NULL,
  `apellido` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1El modelo:
<?php
class People extends Phalcon\Mvc\Model
{
}Muchas gracias amigo, de verdad me sirvio mucho y espero seguir contando con su apoyo. Seguiremos apoyandonos entre usuarios para resolver dudas y seguir aportando en el desarrollo y crecimiento de este framework.