title: How to add space with specified string length in php
body: <p>I want to like add space in sting with specified string length.</p>
  
  <p>For example : <strong>Hello</strong> is my string &amp; i set string length 30 so next string should be start after length 30 so it should be like <code>Hello         Next string</code>.</p>
  
  <p>I would like to add space..</p>
  
  <p>I have used following code but it's not adding space it's take whole character but not added space.</p>
  
  <pre><code>&lt;?php
  $fistString ="Hello World";
  $secondString ="Good";
  echo str_pad($fistString, 45, '  ', STR_PAD_RIGHT).$secondString;
  ?&gt;
  </code></pre>