brackets []

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quick question...
I am hoping some could explain this to me.  I have an array like this:

$completed = array($value1, $value2, $value3);

where the values are sent via a form.
<input type="checkbox" name="completed[]" value="value1">

when I do print_ r() to see what's in the array I get this:
Array (  [0] => [1] => [2] => )

An empty array. But when I do this:

$completed[] = array($value1, $value2, $value3);

Array ( [0] => 1 [1] => 1 [2] => Done [3] => 2 [4] => 1 [5] => 3 [6] => 1 [7] => 4 [8] => 1 [9] => Array ( [0] => [1] => [2] => ) )

I get a multidimensional array with keys and values. How can I get this array to be one dimensional?

Much Thanks - CH

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux