Jump to content

Array Problem


sugan

Recommended Posts

I am having an array of values.If i store the values in another array the following error occurs.

Warning: Cannot use a scalar value as an array in e:\edo\customer\addtrans1.php on line 232

The code is:

$quantity[$i]=$_POST['quantity'.$i]; $qq[$i]=$quantity[$i]; echo $qq[$i];

If i delete the line $qq[$i] then it works fine.what is the error over here.Pls help!

Link to comment
Share on other sites

I don't see anything incorrect there, but I think that can be simplified anyways, why not do it like this?$qq[$i]=$_POST['quantity'.$i];echo $qq[$i];

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...