title: String echo without if
body: <p>I have like 50 strings.</p>
  
  <pre><code>$rand = rand(0,50);
  
  $name[1] = "Jane";
  $name[2] = "Marienne";
  ...
  ...
  ...
  $name[50] = "Mary";
  
  echo $name[$rand];
  </code></pre>
  
  <p>I want to echo "Marienne" if $rand=="2" for example. But the code above is not working. And I don't want to use if statement because there are too many strings. What do you suggest me ? Thanks.</p>