title: Finding a character at a specific position of a string
body: <p>Since I am still new to PHP, I am looking for a way to find out how to get a specific character from a string.</p>
  
  <p>Example:</p>
  
  <pre><code>$word = "master";
  $length = strlen($word);
  $random = rand(1,$length);
  </code></pre>
  
  <p>So let's say the $random value is 3, then I would like to find out what character the third one is, so in this case the character "s". If $random was 2 I would like to know that it's a "a".</p>
  
  <p>I am sure this is really easy, but I tried some substr ideas for nearly an hour now and it always fails.</p>
  
  <p>Your help would be greatly appreciated.</p>