title: How do I convert this CSV to a better format using PHP?
body: <p>I have a CSV file sorted by Country, then State, and then City. It looks like this:</p>
  <pre><code>USA,California,Arcata
  USA,California,Bakersfield
  USA,California,Barstow
  USA,California,Berkeley
  USA,California,Chico
  USA,California,Delano
  USA,California,El Centro
  USA,California,Eureka
  USA,California,Fresno
  USA,California,Irvine
  USA,Colorado,Colorado Springs
  USA,Colorado,Denver
  USA,Colorado,Durango
  USA,Colorado,Fort Collins
  </code></pre>
  <p>I want to create an output file that looks like this:</p>
  <pre><code>USA
  -California
  --Bakersfield
  --Barstow
  --Berkeley
  --Chico
  --Delano
  --El Centro
  --Eureka
  --Fresno
  --Irvine
  -Colorado
  --Colorado Springs
  --Denver
  --Durango
  --Fort Collins
  </code></pre>
  <p>I would like the states to be prepended with a single dash, and cities to be prepended with 2 dashes within each state.</p>
  <p>I'm using PHP on WordPress. Can someone help me create this output? Thanks!</p>