我有以下代码:
<?php
require_once('IPTC.php');
$iptc = new Image_IPTC('001.jpg');
print_r($iptc);
?>
它返回:
Image_IPTC 对象 ( [_sFilename] => 001.jpg [_aIPTC] => 数组 ( [1#090] => 数组 ( [0] => %G ) [2#000] => 数组 ( [0] => ) [2#005] => 数组 ( [0] => TITULO NO WINDOWS, TITLE NO BRIDGE ) [2#080] => 数组 ( [0] => pictureauthor ) [2#085] => 数组 ( [0] => 摄影师 ) [2#090] => 数组 ( [0] => mycity ) [2#095] => 数组 ( [0] => ST ) [2#101] => 数组 ( [0] => mycountry ) [2#105] => 数组 ( [0] => IWANTTHIS1 ) [2#116] => 数组 ( [0] => copyrightinfo ) [2#120] => 数组 ( [0] => IWANTTHIS2 ) ) [_bIPTCParse] => 1)
这是一个虚拟问题,但我如何将文本“IWANTTHIS1”和“IWANTTHIS2”放入 2 个不同的变量中,以便像这样使用:
echo "title: $variable1 <br />";
echo "descr: $variable2";
导致:
title: IWANTTHIS1
descr: IWANTTHIS2
我很确定这对你们来说非常容易,但我仍在学习这一切。我认为它是数组中的数组?想不通。
谢谢。