To import IPTC keywords (which are stored in an array) into a scalar, try this sort of approach:
$keywordcount = count($iptc["2#025"]);
for ($i=0; $i<$keywordcount; $i++) $keywords .= $iptc["2#025"][$i] . " ";
(you could strip the trailing space if you wanted).
If you are importing data from some Mac applications, they may put chr(213) into strings to access a closing quote character. This prints as a captial O with a tilde above it in a web browser or on Windows. You can fix this with:
function ConvertChars($in)
{
return str_replace(chr(213),"'",$in);
}
We use aspects of this code at www.thirdlight.com when parsing IPTC tags. XMP seems to be the better solution these days (being XML based is a great improvement!!).