PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
itsmani1
Forum Regular
Posts: 791 Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:
Post
by itsmani1 » Sat Oct 31, 2009 7:13 am
Code: Select all
$arr[] = array("foo" => "bar", 12 => true);
$arr[] = array("fo" => "ba");
this code has following output:
Code: Select all
Array
(
[0] => Array
(
[foo] => bar
[12] => 1
)
[1] => Array
(
[fo] => ba
)
)
I wanted output like this:
Code: Select all
Array
(
[0] => Array
(
[foo] => bar
[12] => 1
[fo] => ba
)
)
acaibdu
Forum Newbie
Posts: 1 Joined: Sat Oct 31, 2009 8:01 am
Post
by acaibdu » Sat Oct 31, 2009 8:08 am
I have the same problem. Thanks for sharing.
Mark Baker
Forum Regular
Posts: 710 Joined: Thu Oct 30, 2008 6:24 pm
Post
by Mark Baker » Sat Oct 31, 2009 8:14 am
$arr[0] = array("foo" => "bar", 12 => true);
$arr[0] = array("fo" => "ba");