HI,
I got two array.
var_dump($tbDateArr);
var_dump($tbTitleArr);
output:
array
0 =>
object(stdClass)[16]
public 'eventDate' => string '5' (length=1)
1 =>
object(stdClass)[17]
public 'eventDate' => string '16' (length=2)
array
0 =>
object(stdClass)[18]
public 'eventTitle' => string 'mar' (length=10)
1 =>
object(stdClass)[19]
public 'eventTitle' => string 'tri' (length=10)
BTW,I print them as this,
print_r($tbDateArr);
echo '<br>';
print_r($tbTitleArr);
Array ( [0] => stdClass Object ( [eventDate] => 5 ) [1] => stdClass Object ( [eventDate] => 16 ) )
Array ( [0] => stdClass Object ( [eventTitle] => mar ) [1] => stdClass Object ( [eventTitle] => tri ) )
I tried to combin them,
$dataArr = array_combine($tbDateArr, $tbTitleArr);
I JUST WANT THE SIMPLY RESULT as this,
Array
(
[5] => mar
[16] => tri
)
Is there anything wrong? Appreciated for your help.
[updated with array_merge]
array
0 =>
object(stdClass)[16]
public 'eventDate' => string '5' (length=1)
1 =>
object(stdClass)[17]
public 'eventDate' => string '16' (length=2)
2 =>
object(stdClass)[18]
public 'eventTitle' => string 'fuzhou mar' (length=10)
3 =>
object(stdClass)[19]
public 'eventTitle' => string 'weihai tri' (length=10)