hello, 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.
my smilies table is laid out per this:
id - autogenerated id number
code - code used to display smilie (eg :) )
imgsrc - the image to replace above code with
the script uses the following for its smilies array:
// Smileys
$smileys = array(
':)' => 'smiley',
':-)' => 'smiley',
':(' => 'smiley-sad',
':-(' => 'smiley-sad',
':D' => 'smiley-lol',
';-)' => 'smiley-wink',
';)' => 'smiley-wink',
':o' => 'smiley-surprise',
':-o' => 'smiley-surprise',
'8-)' => 'smiley-cool',
'8)' => 'smiley-cool',
':|' => 'smiley-neutral',
':-|' => 'smiley-neutral',
":'(" => 'smiley-cry',
":'-(" => 'smiley-cry',
":p" => 'smiley-razz',
":-p" => 'smiley-razz',
":s" => 'smiley-confuse',
":-s" => 'smiley-confuse',
":x" => 'smiley-mad',
":-x" => 'smiley-mad',
);
left side is code and right is filename (script appends the extension and prepends location itself)
hopeing this isnt out of the realms of posibility.
cheers