title: Delete parts of strings in an array depending on character (PHP)
body: <p>I have an array with string elements and I want to delete parts of each string. The print_r($myarray) gives: </p>
  
  <pre><code>Array([0] =&gt; WSN4/temp [1]=&gt;WSN5/temp [2] =&gt;WSN7/humi ... [n]=&gt;WSNn/humi) 
  </code></pre>
  
  <p>I want to delete all characters from "/" until the end. The output of the newarray should be:</p>
  
  <pre><code>Array([0]=&gt;WSN4 [1]=&gt;WSN5 [2]=&gt;WSN7 ... [n]=&gt;WSNn)
  </code></pre>
  
  <p>I would be thankful, if someone has an easy solution or any advice to solve this problem.</p>