note 87814 added to function.iptcembed
| From: | php at NOSPAM dot samedia dot eu | Date: | Tue, 23 Dec 2008 16:51:52 +0000 |
| Subject: | note 87814 added to function.iptcembed | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148479@lists.php.net to get a copy of this message | ||
In reply to support at image-host-script dot com:
Great script, just what I needed.
However, I noticed that multiple entries for a tag are not supported, only the first one will be
returned.
To make this work I modified the function get($tag) as follows
<?php
function get($tag) {
if(isset($this->meta["2#$tag"])) {
if(count($this->meta["2#$tag"]) > 1) return
implode(";",$this->meta["2#$tag"]);
else return $this->meta["2#$tag"][0];
}
else return false;
}
?>
Now, if you have f.e. multiple keywords they will be returned as a semicolon-separated list.
----
Server IP: 217.160.72.57
Probable Submitter: 79.195.40.166
----
Manual Page -- http://www.php.net/manual/en/function.iptcembed.php
Edit -- https://master.php.net/note/edit/87814
Del: integrated -- https://master.php.net/note/delete/87814/integrated
Del: useless -- https://master.php.net/note/delete/87814/useless
Del: bad code -- https://master.php.net/note/delete/87814/bad+code
Del: spam -- https://master.php.net/note/delete/87814/spam
Del: non-english -- https://master.php.net/note/delete/87814/non-english
Del: in docs -- https://master.php.net/note/delete/87814/in+docs
Del: other reasons-- https://master.php.net/note/delete/87814
Reject -- https://master.php.net/note/reject/87814
Search -- https://master.php.net/manage/user-notes.php