我正在尝试从Vimeo API获取每个视频的特定链接。我可以遍历结果并在foreach中回显它们但是当我尝试访问特定值时,它仍然会显示所有结果:
<MemoPads>
<ReviewFeesType>
<ReviewFees>
<ENTRYDATETIME>2017-09-05</ENTRYDATETIME>
<USERID>admin</USERID>
<MEMOENTRY>Review fees test</MEMOENTRY>
</ReviewFees>
</ReviewFeesType>
<UnderwriterReviewType>
<UnderwriterReview>
<ENTRYDATETIME>2017-04-12</ENTRYDATETIME>
<USERID>ADMIN</USERID>
<MEMOENTRY>Underwriter Rule</MEMOENTRY>
</UnderwriterReview>
<UnderwriterReview>
<ENTRYDATETIME>2017-09-05</ENTRYDATETIME>
<USERID>admin</USERID>
<MEMOENTRY>month bank statement. </MEMOENTRY>
</UnderwriterReview>
</UnderwriterReviewType>
</MemoPads>
如何只获取$ value等于'1920'的结果?
答案 0 :(得分:2)
使用==代替= here。
if ($value['width'] == 1920) {
echo $value['link_secure'];
} else {
echo 'no match';
}