title: Split string programmatically php
body: <p>I have this 2 strings:</p>
  <p>String 1:</p>
  <blockquote>
  <p>AV. LOS TALLERES NRO. 4898 URB. EL NARANJAL LIMA - LIMA - INDEPENDENCIA</p>
  </blockquote>
  <p>String 2:</p>
  <blockquote>
  <p>LA JOYA MZA. I LOTE. 13 -B (PLAZA PRINCIPAL DE LA JOYA)  AREQUIPA - AREQUIPA - LA JOYA</p>
  </blockquote>
  <p>I want to output only from 1st string:</p>
  <blockquote>
  <p>LIMA - LIMA - INDEPENDENCIA</p>
  </blockquote>
  <p>and from 2nd string:</p>
  <blockquote>
  <p>AREQUIPA - AREQUIPA - LA JOYA</p>
  </blockquote>
  <p>I'm receiving those strings and I have to show only that part. There're always 3 parts and separated with <code>-</code> but the text changes, for example: what I receive could be one of:</p>
  <blockquote>
  <p>AREQUIPA - AREQUIPA - AREQUIPA</p>
  <p>LIMA - LIMA - ATE</p>
  <p>PROV. CONST. DEL CALLAO - PROV. CONST. DEL CALLAO - CALLAO</p>
  <p>AREQUIPA - CAMANA - CAMANA</p>
  </blockquote>
  <p>How can I split them? I tried counting from the end to the last space after the <code>-</code>, but I feel there is a better way.</p>