title: populate multi-dimensional arrays
body: <p>im just working on integrating a script into my own site and this script (being that is has a chat feature) has inbuilt smilies, my site also has smilies but the url of them is stored in the sites mysql db, pulling said files from the db into the script im integrating is easy, but the script uses a 2 dimensional array for the smilies (shown below) and i am not sure how i can parse the msyql query output to put the smilies from my site into the array format the script needs. </p>
  
  <p>my smilies table is laid out per this:</p>
  
  <pre><code>id - autogenerated id number
  code - code used to display smilie (eg :) )
  imgsrc - the image to replace above code with
  </code></pre>
  
  <p>the script uses the following for its smilies array:</p>
  
  <pre><code>    // Smileys
  $smileys = array( 
  
  ':)'    =&gt;  'smiley',
  ':-)'   =&gt;  'smiley',
  ':('    =&gt;  'smiley-sad',
  ':-('   =&gt;  'smiley-sad',
  ':D'    =&gt;  'smiley-lol',
  ';-)'   =&gt;  'smiley-wink',
  ';)'    =&gt;  'smiley-wink',
  ':o'    =&gt;  'smiley-surprise',
  ':-o'   =&gt;  'smiley-surprise',
  '8-)'   =&gt;  'smiley-cool',
  '8)'    =&gt;  'smiley-cool',
  ':|'    =&gt;  'smiley-neutral',
  ':-|'   =&gt;  'smiley-neutral',
  ":'("   =&gt;  'smiley-cry',
  ":'-("  =&gt;  'smiley-cry',
  ":p"    =&gt;  'smiley-razz',
  ":-p"   =&gt;  'smiley-razz',
  ":s"    =&gt;  'smiley-confuse',
  ":-s"   =&gt;  'smiley-confuse',
  ":x"    =&gt;  'smiley-mad',
  ":-x"   =&gt;  'smiley-mad',
  
  );
  </code></pre>
  
  <p>left side is code and right is filename (script appends the extension and prepends location itself)</p>
  
  <p>hopeing this isnt out of the realms of posibility.</p>
  
  <p>cheers</p>