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

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:


$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";



will result in:






    [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