title: Stuck with the number pattern printing in PHP
body: <p>Stuck with the number pattern printing logic. Let me know what i am doing wrong as my file is simply going on execution without giving me a pattern.</p>
  
  <p>My Code --</p>
  
  <pre><code>&lt;?php
  
  $num = 4;
  
  for( $j=1 ; $j &lt;= $num ; $j++ )
  {
      for( $i=$j ; $i &lt; $num-1 ; $i++ )
      {
      echo "&amp;nbsp;";
      }
  
      for( $j ; $j &gt;= 1 ; $j-- )
      {
      echo $j."&amp;nbsp;";
      }
  
  echo "&lt;br /&gt;";
  }
  </code></pre>
  
  <p>Pattern to achieve --</p>
  
  <pre><code>   1
    21
   321
  4321
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>After applying new changes following are the screenshots ---</p>
  
  <p><img src="https://i.stack.imgur.com/WqB3M.jpg" alt="On STAR USEAGE"></p>
  
  <p><img src="https://i.stack.imgur.com/YHZND.jpg" alt="ON BLANK USAGE"></p>