当我使用我的代码时:
即将到来的数据将是这样
Array
(
[name] => Facebook
[author] => Facebook
[physicalAddress] => 1 Hacker Way\nMenlo Park, CA 94025
[supportEmail] => android-support@fb.com
[supportUrl] => https://www.facebook.com/facebook
[category] => Social
[storeCategory] => SOCIAL
[price] => 0
[changelog] => • Improvements for reliability and speed
[datePublished] => April 11, 2019
[datePublishedIso] => 2019-04-11T00:00:00Z
[fileSize] => Varies with device
[numDownloads] => 1,000,000,000+
[versionName] => Varies with device
[operatingSystems] => Varies with device
[contentRating] => Parental guidance
)
我想单独获取数据
喜欢
姓名,作者等
我该怎么办?
答案 0 :(得分:-1)
非常简单。这是您的操作方式:
<?php
$details = array(
'name' => 'Facebook',
'author' => 'Facebook',
'physicalAddress' => '1 Hacker Way\nMenlo Park, CA 94025',
'supportEmail' => 'android-support@fb.com',
'supportUrl' => 'https://www.facebook.com/facebook',
'category' => 'Social',
'storeCategory' => 'SOCIAL',
'price' => '0',
'changelog' => '• Improvements for reliability and speed',
'datePublished' => 'April 11, 2019',
'datePublishedIso' => '2019-04-11T00:00:00Z',
'fileSize' => 'Varies with device',
'numDownloads' => '1,000,000,000+',
'versionName' => 'Varies with device',
'operatingSystems' => 'Varies with device',
'contentRating' => 'Parental guidance',
);
?>
<p><strong>Name: </strong><?php echo $details['name']; ?></p>
<p><strong>Author: </strong><?=$details['author']; ?></p>
<p><strong>Date Published ISO: </strong><?php echo $details['datePublishedIso']; ?></p>