Cant Insert Multiple Rows In Db

First of all say sorry for my English,

Am a new user of YII ,

am Buid a POS(point of sale) application but stuck with the item purchase page,

plese ceck attached image ,

the question is how to insert that 5 items after clicking post

Iam realy stucked [size="5"]please helpme[/size]

try this link. you will get solution

http://www.yiiframework.com/doc/guide/1.1/en/form.table

I check that, But did not work

ican’t understand that in form of that link

[size="5"]<?php foreach($items as $i=>$item): ?>[/size]

what is meaning

Hope this example help you:




<?php

$a = array('abe','ben','cam');

foreach ($a as $k=>&$n)

    $n = strtoupper($n);

foreach ($a as $k=>$n) // notice NO reference here!

    echo "$n\n";

print_r($a);

?>


will result in:


ABE

BEN

BEN

Array

(

    [0] => ABE

    [1] => BEN

    [2] => BEN

)



From PhP manual

$items as $i=>$item

$i -> number of the array,

$item -> model,

r u kidding me??? :blink:

thank you for your response I am try to fix it