php codeigniter select results from foreach and save into an array -


i have php mysql query results following...

array (     [0] => stdclass object         (             [id] => 52             [sku] =>              [name] => stone product 52     )     [1] => stdclass object         (             [id] => 53             [sku] =>              [name] => stone product 53     )      .        .     .     )  array (     [0] => stdclass object         (             [id] => 12             [sku] =>              [name] => stone product 12     )     [1] => stdclass object         (             [id] => 13             [sku] =>              [name] => stone product 13     )      .        .     .     ) 

and want results below

array(     [0] => stdclass object         (             [id] => 52             [sku] =>              [name] => stone product 52     )       [1] => stdclass object         (             [id] => 53             [sku] =>              [name] => stone product 53     )      [2] => stdclass object         (             [id] => 12             [sku] =>              [name] => stone product 12     )      [3] => stdclass object         (             [id] => 13             [sku] =>              [name] => stone product 13     ) 

in single array

please suggest me php code

you should not joining these results in php. use one query both sets of results, cut down on db reads.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -