08.13 php saved
anthony_
Tags add more
Set combine  
Note
Would like to know how to get the desired result from the given array with Set::combine()
  1.  
  2. Given:
  3. -------------------
  4. (
  5.     [0] => Array
  6.         (
  7.             [0] => Array
  8.                 (
  9.                     [count] => 2
  10.                 )
  11.  
  12.             [RoundVote] => Array
  13.                 (
  14.                     [contestant_id] => 1
  15.                     [round_id] => 1
  16.                 )
  17.  
  18.         )
  19.  
  20.     [1] => Array
  21.         (
  22.             [0] => Array
  23.                 (
  24.                     [count] => 1
  25.                 )
  26.  
  27.             [RoundVote] => Array
  28.                 (
  29.                     [contestant_id] => 1
  30.                     [round_id] => 2
  31.                 )
  32.  
  33.         )
  34. )
  35.  
  36. Desired Result with Set::combine()
  37. ------------------------------
  38.  
  39. (
  40.     [0] => Array
  41.         (
  42.             [RoundVote] => Array
  43.                 (
  44.                     [contestant_id] => 1
  45.                     [round_id] => 1
  46.                     [count] => 2
  47.                 )
  48.  
  49.         )
  50.  
  51.     [1] => Array
  52.         (
  53.  
  54.             [RoundVote] => Array
  55.                 (
  56.                     [contestant_id] => 1
  57.                     [round_id] => 2
  58.                     [count] => 1
  59.                 )
  60.  
  61.         )
  62. )
Parsed in 0.050 seconds, using GeSHi 1.0.7.14

Modify this Paste