title: How Get Suggestions from Solr Server in a PHP variable
body: <p>I've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question.</p>
  
  <p>Below you can see an overview of my goal.</p>
  
  <p>I'm using Magento CE 1.7.0.2 &amp; Solr 4.6.0.</p>
  
  <p><strong>Working with Spell checker in Solr</strong></p>
  
  <p>I'm Searching with <strong>iphon</strong> instead of <strong>iphone</strong> the solr Spell Checker throwing these suggestions.</p>
  
  <pre><code>&lt;response&gt;
    &lt;lst name="responseHeader"&gt;
      &lt;int name="status"&gt;0&lt;/int&gt;
      &lt;int name="QTime"&gt;48&lt;/int&gt;
    &lt;/lst&gt;
    &lt;str name="command"&gt;build&lt;/str&gt;
      &lt;result name="response" numFound="0" start="0"&gt;&lt;/result&gt;
      &lt;lst name="spellcheck"&gt;
        &lt;lst name="suggestions"&gt;
          &lt;lst name="iphon"&gt;
             &lt;int name="numFound"&gt;1&lt;/int&gt;
             &lt;int name="startOffset"&gt;0&lt;/int&gt;
             &lt;int name="endOffset"&gt;5&lt;/int&gt;
             &lt;int name="origFreq"&gt;0&lt;/int&gt;
             &lt;arr name="suggestion"&gt;
               &lt;lst&gt;
                  &lt;str name="word"&gt;iphone&lt;/str&gt;
                  &lt;int name="freq"&gt;27&lt;/int&gt;
               &lt;/lst&gt;
             &lt;/arr&gt;
          &lt;/lst&gt;
          &lt;bool name="correctlySpelled"&gt;false&lt;/bool&gt;
        &lt;/lst&gt;
      &lt;/lst&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>I hope the SpellCheck functionality is working fine.</p>
  
  <p>Here is My <strong>Schema.xml</strong> &amp; <strong>solrconfig.xml</strong> files...</p>
  
  <p><strong>schema.xml</strong></p>
  
  <pre><code>&lt;field name="didyoumean" type="text_general" indexed="true" stored="false" multiValued="true"/&gt;
  &lt;copyField source="fulltext" dest="didyoumean"/&gt;
  </code></pre>
  
  <p><strong>solrconfig.xml</strong></p>
  
  <pre><code>&lt;searchComponent name="spellcheck" class="solr.SpellCheckComponent"&gt;
      &lt;str name="queryAnalyzerFieldType"&gt;didyoumean&lt;/str&gt;
      &lt;lst name="spellchecker"&gt;
        &lt;str name="name"&gt;default&lt;/str&gt;
        &lt;str name="field"&gt;didyoumean&lt;/str&gt;
        &lt;str name="spellcheckIndexDir"&gt;./spellchecker&lt;/str&gt;
        &lt;str name="buildOnOptimize"&gt;true&lt;/str&gt;
        &lt;str name="buildOnCommit"&gt;true&lt;/str&gt;
        &lt;str name="classname"&gt;solr.DirectSolrSpellChecker&lt;/str&gt;
        &lt;str name="distanceMeasure"&gt;internal&lt;/str&gt;
        &lt;float name="accuracy"&gt;0.5&lt;/float&gt;
        &lt;int name="maxEdits"&gt;2&lt;/int&gt;
        &lt;int name="minPrefix"&gt;1&lt;/int&gt;
        &lt;int name="maxInspections"&gt;5&lt;/int&gt;
        &lt;int name="minQueryLength"&gt;4&lt;/int&gt;
      &lt;/lst&gt;
      &lt;lst name="spellchecker"&gt;
        &lt;str name="name"&gt;jarowinkler&lt;/str&gt; 
        &lt;str name="field"&gt;didyoumean&lt;/str&gt;
        &lt;str name="distanceMeasure"&gt;org.apache.lucene.search.spell.JaroWinklerDistance&lt;/str&gt;
        &lt;str name="spellcheckIndexDir"&gt;./spellchecker2&lt;/str&gt;
      &lt;/lst&gt;
  &lt;/searchComponent&gt;
  &lt;requestHandler name="/spell" class="solr.SearchHandler" startup="lazy"&gt;
      &lt;lst name="defaults"&gt;
        &lt;str name="df"&gt;name&lt;/str&gt;
        &lt;str name="spellcheck.dictionary"&gt;default&lt;/str&gt;
        &lt;str name="spellcheck"&gt;on&lt;/str&gt;
        &lt;str name="spellcheck.onlyMorePopular"&gt;true&lt;/str&gt;
        &lt;str name="spellcheck.dictionary"&gt;wordbreak&lt;/str&gt;
        &lt;str name="spellcheck.extendedResults"&gt;true&lt;/str&gt;       
        &lt;str name="spellcheck.count"&gt;10&lt;/str&gt;
        &lt;str name="spellcheck.alternativeTermCount"&gt;5&lt;/str&gt;
        &lt;str name="spellcheck.maxResultsForSuggest"&gt;5&lt;/str&gt;       
        &lt;str name="spellcheck.collate"&gt;true&lt;/str&gt;
        &lt;str name="spellcheck.collateExtendedResults"&gt;true&lt;/str&gt;  
        &lt;str name="spellcheck.maxCollationTries"&gt;10&lt;/str&gt;
        &lt;str name="spellcheck"&gt;true&lt;/str&gt;
        &lt;str name="spellcheck.build"&gt;true&lt;/str&gt;
        &lt;str name="spellcheck.maxCollations"&gt;5&lt;/str&gt;         
      &lt;/lst&gt;
      &lt;arr name="last-components"&gt;
        &lt;str&gt;spellcheck&lt;/str&gt;
      &lt;/arr&gt;
    &lt;/requestHandler&gt;
  </code></pre>
  
  <p>Now, My goal is to display this Suggestions in frontend just like <code>Did you mean:</code> <a href="https://stackoverflow.com/questions/22196793/how-get-suggestions-from-solr-server-in-a-php-variable"><strong>iphone</strong></a>  </p>
  
  <p>Any Ideas ?</p>
  
  <p>How can i get these suggestions in frontend ?</p>