php arrays, How come the maximum array size is 7...?
An array I use in my PHP code can grow only up to 7 elements. Could anybody shed some light to figure this out? please.
Description: I use a PHP session to store an array, which should grow by adding data element on each click I made using Ajax call. (using PHP 5, codeIgniter 2.0.3)
Code:
$companyAddressList = $this->session->userdata('companyAddressList');
$companyAddressList[] = $_POST['address'];
$this->session->set_userdata('companyAddressList',$companyAddressList);
Above code a开发者_运维知识库dd data (an array containing address details) to the "companyAddressList" array for upto 7 elements, but after that the last array element get replaced with each new address data.
精彩评论