note 45360 added to function.iptcparse

From: Date: Fri, 03 Sep 2004 12:06:53 +0000
Subject: note 45360 added to function.iptcparse
Groups: php.notes 
Request: Send a blank email to php-notes+get-75979@lists.php.net to get a copy of this message
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!!). ---- Manual Page -- http://www.php.net/manual/en/function.iptcparse.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45360 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45360&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45360&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75979) next »