title: Replace null array value from array in php
body: <p>I run a query and got id values in an array. Then I push those id like this <code>array_push($id);</code> then I implode ',' into an array and place it in a variable like this  <code>$val = implode(",",$id);</code>. When I output it i get following result
  <code>,2,3,4,5,6,7,8</code>. Problem in this result is that first value is ',' and it is because first record that I am getting from database is giving me Null value. I want to remove <code>','</code> from first place if first record is empty. So that desire result should be <code>2,3,4,5,6,7,8</code>.</p>
  
  <p>Please anybody can help me how can I remove ',' from first place. Or any suggestion to solve this problem</p>