title: concatenate the strings separated by comma but if the string is empty comma should not be in the beginning
body: <p>I have 3 strings:</p>
  
  <pre><code>$string1=1,2,3,4,5,6
  $string2=7,8,9
  $string3=11,12
  </code></pre>
  
  <p>I want to concatenate the above strings separated by comma.</p>
  
  <p>Desired Output:</p>
  
  <pre><code>$string=1,2,3,4,5,6,7,8,9,11,12
  </code></pre>
  
  <p>Since  above all are string i cannot use <code>IMPLODE()</code> also i cannot use <code>(.)</code> concatenation operator as i want the strings to be separated by <code>(,)</code> i.e. comma.</p>
  
  <pre><code>$string = $string1 . "," . $string2 . "," . $string3;
  </code></pre>
  
  <p>thanks to everyone that i got the solution but any of the above strings can be empty also.that means if $string 1 is empty than i will have</p>
  
  <pre><code>$string =,7,8,9,11,12
  </code></pre>
  
  <p>but in any case I <strong>can't afford a comma in the beginning</strong>.</p>
  
  <p>than the output should be </p>
  
  <pre><code>$string =7,8,9,11,12
  </code></pre>
  
  <p>how to achieve the desired output?</p>