title: Alternative for Fatal error: [] operator not supported for strings?
body: <p>I have a table named gs that has information about various symbols, such as Arizona's flag, Arizona's state flower, etc., where Arizona is represented by the value (IDArea) us-az.</p>
  
  <p>A second table - gw_geog - has more information about places, including the full names (e.g. Arizona) and parents (e.g. usa).</p>
  
  <p>A third table - gs2_latin - simply standardizes Latin names. For example, two states may have different names for the same flower (stored in table gs), but both flowers have the same Latin name (stored in gs2_latin).</p>
  
  <p>I have a query that displays a table listing all 50 states alphabetically, along with their state symbols (state birds, in this case), like this...</p>
  
  <p>Alabama | yellowhammer</p>
  
  <p>Alaska | ptarmigan</p>
  
  <p>Nebraska | western meadowlark</p>
  
  <p>Wyoming | western meadowlark</p>
  
  <p>Now I want to write a second query that groups all the places together, so my second table displays like this:</p>
  
  <p>yellowhammer | Alabama</p>
  
  <p>ptarmigan | Alaska</p>
  
  <p>western meadowlark | Nebraska, Wyoming</p>
  
  <p>I haven't yet figured out exactly what the query will look like, and I'm not even sure if I need to include the table gs2_latin. But I hit a problem with my first experiment that has me puzzled.</p>
  
  <p>In my original table, the following dictates that GName will display the name of a state or country...</p>
  
  <pre><code>$Place = $row['GName'];
  </code></pre>
  
  <p>Since I now want to display EVERY state or country associated with a particular symbol, I changed it to this:</p>
  
  <pre><code>$Place[] = $row['GName'];
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <p>Fatal error: [] operator not supported for strings</p>
  
  <p>My query's not finished and may be a little sloppy. But can you see any obvious reasons for this error message? Or is there a better way of doing what I'm trying to do? Thx.</p>
  
  <p>P.S. The most important values in the query below are GS.Symbol (the name of a particular symbol; e.g. sunflower), GS.Latin (a symbol's scientific name) and GName (the name of a state or country).</p>
  
  <pre><code>SELECT GG.N, GG.IDArea, GG.URL GURL, GG.Name GName, GG.Type, GG.IDParent, GG.Parent, GG.ParentName, GG.IDReg,
  GS.N, GS.IDArea SymArea, GS.URL, GS.IDSymbol, GS.Title, GS.PageKind3, GS.Symbol, GS.Latin,
  GS.Desig, GS.DesigGen, GS.DesigGroup, G4.Common, G4.Latin
  FROM gw_geog AS GG
  LEFT JOIN gs AS GS ON GS.IDArea = GG.IDArea
  LEFT JOIN gs2_latin AS G4 ON G4.Common = GS.Symbol
  WHERE GG.IDParent = 'usa' AND GS.DesigGen = :RefCat
  GROUP BY GS.IDSymbol ORDER BY GS.N
  </code></pre>