title: Remove consecutive occurrences of string "start" from array PHP ARRAY
body: <p>I have the following array</p>
  
  <pre><code>Array ( [0] =&gt; **start** [1] =&gt; **start** [2] =&gt; name [3] =&gt; producer [4] =&gt; contact name [5] =&gt; 03354222271 [6] =&gt; fzahid001@gmail.com [7] =&gt; day contact name [8] =&gt; 03354222271 [9] =&gt; venue name [10] =&gt; adress [11] =&gt; country [12] =&gt; city [13] =&gt; desc [14] =&gt; file [15] =&gt; 2016-01-01 [16] =&gt; 01:00 [17] =&gt; 06:00 [18] =&gt; 2 [19] =&gt; music_festival [20] =&gt; 2000+ [21] =&gt; quick [22] =&gt; alcohol [23] =&gt; quick [24] =&gt; 10x10 [25] =&gt; ***no*** [26] =&gt; ***no*** [27] =&gt; ***no*** [28] =&gt; 2 [29] =&gt; 0 [30] =&gt; 4 [31] =&gt; $158 [32] =&gt; $118.5 [33] =&gt; $284 [34] =&gt; $960 [35] =&gt; **start** [36] =&gt; na [37] =&gt; producer [38] =&gt; con [39] =&gt; 1 [40] =&gt; fzahid001@gmail.com [41] =&gt; nam [42] =&gt; 1 [43] =&gt; venue [44] =&gt; ad [45] =&gt; co [46] =&gt; ci [47] =&gt; description test [48] =&gt; download555ssss.png [49] =&gt; 2016-12-07 [50] =&gt; 13:00 [51] =&gt; 19:00 [52] =&gt; 2 [53] =&gt; manual_selection [54] =&gt; ATV [55] =&gt; 10x10 [56] =&gt; no [57] =&gt; no [58] =&gt; no [59] =&gt; 1 [60] =&gt; 1 [61] =&gt; 1 [62] =&gt; $109.5 [63] =&gt; $118.5 [64] =&gt; $99.5 [65] =&gt; $728 [66] =&gt; **start** [67] =&gt; Race [68] =&gt; Race Club [69] =&gt; Faizan [70] =&gt; 03354222271 [71] =&gt; fzahid001@gmail.com [72] =&gt; Faizan Zahid [73] =&gt; 03354222271 [74] =&gt; DHA [75] =&gt; 90-H Tariq Gardens [76] =&gt; Pakistan [77] =&gt; Lahore [78] =&gt; [79] =&gt; images.jpg [80] =&gt; 2017-01-01 [81] =&gt; 00:00 [82] =&gt; 07:00 [83] =&gt; 2 [84] =&gt; cycling_road_race [85] =&gt; 1_field [86] =&gt; 1_399 [87] =&gt; electronic [88] =&gt; quick [89] =&gt; 10x10 [90] =&gt; no [91] =&gt; no [92] =&gt; no [93] =&gt; 1 [94] =&gt; 0 [95] =&gt; 1 [96] =&gt; $109.5 [97] =&gt; $118.5 [98] =&gt; $99.5 [99] =&gt; $796.5 [100] =&gt; ) 
  </code></pre>
  
  <p>Now what I want to do is, remove the consecutive duplicates of "start". I am currently using following code</p>
  
  <pre><code>foreach ($updateddata as $value){
      if($value != $previousvalue){
  
          array_push($finaldata, $value);
      }
      $previousvalue  = $value;
  }
  </code></pre>
  
  <p>but is also removes other consecutive duplicates as well which I don't want to remove. Kindly help me how to do this. </p>
  
  <p>I have highlighted the occurrences of "start" which I want to remove and make it one single entry, while leaving the other string as it is e.g. I don't want to remove the duplicates of string "no"</p>