title: Every possible combination of a string in php
body: <p>I need to build strings in PHP with every possible combination like</p>
  
  <blockquote>
    <p>s5z-s4z-s3z-s2z-s1z</p>
  </blockquote>
  
  <p>where the 's' then the number are always in the same position.
  the only difference is whether there is a z on the end or not.</p>
  
  <p>So for example I would have </p>
  
  <ul>
  <li>s5z-s4z-s3z-s2z-s1</li>
  <li>s5z-s4z-s3z-s2z-s1z</li>
  <li>s5z-s4z-s3z-s2-s1</li>
  <li>s5z-s4z-s3z-s2z-s1</li>
  <li>s5z-s4z-s3z-s2-s1z</li>
  <li>s5z-s4z-s3-s2-s1z</li>
  <li>etc.</li>
  </ul>
  
  <p>How would I go about doing that?</p>