note 103148 modified in function.iptcembed by danbrown
| From: | danbrown@php.net | Date: | Tue, 29 Mar 2011 14:04:01 +0000 |
| Subject: | note 103148 modified in function.iptcembed by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178296@lists.php.net to get a copy of this message | ||
I just found an error while trying to write several keywords (an array) with the binary function...
please consider using the following:
<?php
function binary() {
$iptc_new = '';
foreach (array_keys($this->meta) as $s) {
$tag = str_replace("2#", "", $s);
if(count($this->meta[$s])>1){
foreach ($this->meta[$s] as $row){
$iptc_new .= $this->iptc_maketag(2, $tag, $row);
}
}else {
$iptc_new .= $this->iptc_maketag(2, $tag, $this->meta[$s][0]);
}
}
return $iptc_new;
}
?>
--was--
I just found an error while trying to write several keywords (an array) with the binary function...
please consider using the following:
function binary() {
$iptc_new = '';
foreach (array_keys($this->meta) as $s) {
$tag = str_replace("2#", "", $s);
if(count($this->meta[$s])>1){
foreach ($this->meta[$s] as $row){
$iptc_new .= $this->iptc_maketag(2, $tag, $row);
}
}else {
$iptc_new .= $this->iptc_maketag(2, $tag, $this->meta[$s][0]);
}
}
return $iptc_new;
}
http://php.net/manual/en/function.iptcembed.php