【问题标题】:JSon/SQL Project - (NHL Score & Logos) Only Missing LogosJSON/SQL 项目 - (NHL 分数和徽标)仅缺少徽标
【发布时间】:2017-04-22 18:17:58
【问题描述】:

好的。

场景: 我使用https://www.mysportsfeeds.com 下载了一个带有 NHL 匹配项的 JSON 文件。 JSON 文件包含团队名称和结果。使用内容我创建了一个看起来像这样的表格。 Json 文件如下所示:http://stephaniie.com/scoreboard.json

    scoreboard: {
lastUpdatedOn: "2017-04-17 9:23:44 AM",
gameScore: [
{
game: {
ID: "40295",
date: "2017-04-16",
time: "3:00PM",
awayTeam: {
ID: "25",
City: "Minnesota",
Name: "Wild",
Abbreviation: "MIN"
},
homeTeam: {
ID: "17",
City: "St. Louis",
Name: "Blues",
Abbreviation: "STL"
},
location: "Scottrade Center"
},
isUnplayed: "false",
isInProgress: "false",
isCompleted: "true",
awayScore: "1",
awayShots: "41",
homeScore: "3",
homeShots: "31",
periodSummary: {
period: [
{
@number: "1",
awayScore: "0",
awayShots: "9",
homeScore: "1",
homeShots: "15"
},
{
@number: "2",
awayScore: "1",
awayShots: "13",
homeScore: "1",
homeShots: "8"
},
{
@number: "3",
awayScore: "0",
awayShots: "19",
homeScore: "1",
homeShots: "8"
}
]
}
},
{
game: {
ID: "40287",
date: "2017-04-16",
time: "6:00PM",
awayTeam: {
ID: "10",
City: "Pittsburgh",
Name: "Penguins",
Abbreviation: "PIT"
},
homeTeam: {
ID: "19",
City: "Columbus",
Name: "Blue Jackets",
Abbreviation: "CBJ"
},
location: "Nationwide Arena"
},
isUnplayed: "false",
isInProgress: "false",
isCompleted: "true",
awayScore: "5",
awayShots: "47",
homeScore: "4",
homeShots: "37",
periodSummary: {
period: [
{
@number: "1",
awayScore: "1",
awayShots: "11",
homeScore: "3",
homeShots: "14"
},
{
@number: "2",
awayScore: "2",
awayShots: "19",
homeScore: "0",
homeShots: "8"
},
{
@number: "3",
awayScore: "1",
awayShots: "10",
homeScore: "1",
homeShots: "8"
},
{
@number: "4",
awayScore: "1",
awayShots: "7",
homeScore: "0",
homeShots: "7"
}
]
}
},
{
game: {
ID: "40275",
date: "2017-04-16",
time: "7:00PM",
awayTeam: {
ID: "14",
City: "Montreal",
Name: "Canadiens",
Abbreviation: "MTL"
},
homeTeam: {
ID: "9",
City: "New York",
Name: "Rangers",
Abbreviation: "NYR"
},
location: "Madison Square Gardens"
},
isUnplayed: "false",
isInProgress: "false",
isCompleted: "true",
awayScore: "3",
awayShots: "29",
homeScore: "1",
homeShots: "21",
periodSummary: {
period: [
{
@number: "1",
awayScore: "0",
awayShots: "10",
homeScore: "0",
homeShots: "6"
},
{
@number: "2",
awayScore: "1",
awayShots: "12",
homeScore: "0",
homeShots: "6"
},
{
@number: "3",
awayScore: "2",
awayShots: "7",
homeScore: "1",
homeShots: "9"
}
]
}
},
{
game: {
ID: "40303",
date: "2017-04-16",
time: "10:00PM",
awayTeam: {
ID: "24",
City: "Edmonton",
Name: "Oilers",
Abbreviation: "EDM"
},
homeTeam: {
ID: "26",
City: "San Jose",
Name: "Sharks",
Abbreviation: "SJS"
},
location: "SAP Center"
},
isUnplayed: "false",
isInProgress: "false",
isCompleted: "true",
awayScore: "1",
awayShots: "22",
homeScore: "0",
homeShots: "23",
periodSummary: {
period: [
{
@number: "1",
awayScore: "0",
awayShots: "6",
homeScore: "0",
homeShots: "13"
},
{
@number: "2",
awayScore: "0",
awayShots: "12",
homeScore: "0",
homeShots: "4"
},
{
@number: "3",
awayScore: "1",
awayShots: "4",
homeScore: "0",
homeShots: "6"
}
]
}
}
]
}
}

如您所见,很遗憾,它不包含团队徽标。考虑到这是一个爱好项目(非商业),被认为以稍微不同的方式进行。

理论: 我创建了一个 SQL 表,其中包含 NHL 团队名称和指向他们徽标的超链接。 我还创建了一个数据库联系人并使用 SELECT 语句从 SQL 表中检索数据。

$ A_query = "SELECT * FROM nhl_team_logo ORDER BY ID" ;
$ A_result = pg_query ($ con, $ a_query) or the ( "Can not execute query: $ a_query \ n" );

然而,现在我有点上坡了。

问题:
我应该如何使用逻辑来配对这两者? (Mysports FEED 和 SQL 表)? 显然,我的自然想法是在 SQL 数据库的“Alt-Logo”和提要的“Away Team-Name”和“Home Team-Name”之间创建一个链接,因为这两个值是相同的。但是,我有点不确定如何在逻辑上写这个。

现在(仅限 Mysport 的 Feed),HTML 代码如下所示:

Table class = "table" >
<Tbody>
<? Php
Foreach ($ nhl ['scoreboard'] ['gameScore'] as $ game) {
Echo '<tr>';
Echo '<td> <img src = "images / used / sports / Untitled-3_13.png" alt = "W3Schools.com" style = "max-width: 80%" > </ td>';
Echo '<td>'. $ Game ['game'] ['away team'] ['name']. '</ Td>';
Echo '<td class = "bold" >'. $ Game ['awayScore']. '-'. $ Game ['homeScore']. '</ Td>';
Echo '<td>'. $ Game ['game'] ['homeTeam'] ['Name']. '</ Td>';
Echo '<td> <img src = "images / used / sports / Untitled-3_14.png" alt = "W3Schools.com" style = "max-width: 80%" > </ td>';
}?>
</ Tbody>
</ Table>

你能帮帮我吗?

编辑:这是数据库的外观... SQL Postgres:

回答..

我的一个朋友解决了这个问题。我提供了足够的代码。这是一个相当长的答案,我提供它的原因是.. 1.我想要一个很好的例子来寻找自己。所以不管怎样,我要这个副本。原因是,大多数教程、Stackoverflows 等,它们提供的代码很少,但它仅用于一个功能。如果你读一本书,你需要整个部分,而不仅仅是乱码。这就是为什么一个完整的理解和代码片段对于理解代码是必不可少的,如果你不这样做的话。好吧.. 如果您已经熟悉此方法和功能,这将无济于事。

因此,我在这里提供了从 Feed(XML 和 JSON)创建新闻项目和体育项目的代码。解析它们。创建数组并在网站上显示它们+数据库连接教程包括在内。以及如何将 SQL 与 JSON 结合使用以在两者之间建立连接。你太受欢迎了!

结果将是这样的。

1. 创建数据库连接。我在 /config/db.php 中使用它。也不在乎你看到我的登录凭据只是在本地主机上。

DB.PHP

$dbhost = 'localhost';
$dbport = 5432;
$dbname = 'acme';
$dbuser = 'devuser';
$dbpass = '123456';

$con = pg_connect("host=".$dbhost." port=".$dbport.". 
    dbname=".$dbname." user=".$dbuser." password=".$dbpass);

2. 为您的 XML RSS FEED 连接制作一个文件(我使用 NYT RSS Feed)。我叫我的 rss-feeds.php

RSS-FEEDS.PHP

<?php

    //Gets RSS FEEDs
    $url = "http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"; // xmld.xml contains above data
    $feeds = file_get_contents($url);
    $rss = simplexml_load_string($feeds);

    //Creates Array
    $items = [];

    //Loop Feed Objects (images, description) into Array  as they are Media: tags and harder to get.
        foreach($rss->channel->item as $entry) {
        $image = '';
        $image = 'N/A';
        foreach ($entry->children('media', true) as $k => $v) {
            $attributes = $v->attributes();

            if (count($attributes) == 0) {
                continue;
            } else {
                $image = $attributes->url;
            }
        $content_data = (string)$entry->children("media", true)->description;
        $credit = (string)$entry->children("media", true)->credit;
        $creator = (string)$entry->children("dc", true)->creator;
        $pubDate = (string)$entry->pubDate;
        $pubDate = preg_split('/[\s,]+/', $pubDate);


        }

        //Not sure.. guess it find the last two rss feed obects - Title and Link. 
        $items[] = [
            'link' => $entry->link,
            'title' => $entry->title,
            'image' => $image,
            'creator' =>$creator,
            'pubDate' =>$pubDate,
        ];

    }

?>

3. 为您的 Sports JSON Connection 创建一个文件(我使用https://www.mysportsfeeds.com/)。我叫我的sports-json.php。 .

SPORTS-JSON.PHP

<?php
error_reporting(E_ALL);

$url = 'https://www.mysportsfeeds.com/api/feed/pull/nhl/2017-playoff/scoreboard.json?fordate=20170416';

$username = 'username';
$password = 'password';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
//curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
//curl_setopt($ch, CURLOPT_REFERER, $url);


curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);

$result = curl_exec($ch);
$info = curl_getinfo($ch);
$nhl=json_decode($result,true);
curl_close($ch);


?>

4. 在 Index.php - (website) - 包括 DB、Sports Feed (json) 和 RSS FEED (XML) 为 SQL DB TABLE 创建一个 Select 函数。我使用 Postgres。

<?php
include 'rss-feeds.php';
include 'sports-json.php'; 
include 'config/db.php'; //This is the database connection. 

 function getTeamLogos(){
    global $con;
    $logos = [];
    $a_query = "SELECT logo, team FROM nhl_team_logo;";
    $a_result = pg_query($con, $a_query) or die("Cannot execute");
    $placeholder_logo = 'placeholder.jpg';
    if(pg_num_rows($a_result ) > 0) {
        while ($row = pg_fetch_assoc($a_result )) {
            $logos[$row['team']] = ($row['logo'] ? $row['logo'] : $placeholder_logo);
        }
    }
    return $logos;
}
?>

5. 最后,在 (index.php) HTML 代码中使用 json、xml 和 sql。我提供了一种演示如何使用这三个中的每一个。

JSON 和 SQL:

<?php $logos = getTeamLogos();?>
<table class="table">
<tbody>
<?php
   foreach ($nhl['scoreboard']['gameScore'] as $game) {
       echo '<tr>';
       echo '<td><img src="'.$logos[$game['game']['homeTeam']['Name']].'" alt="'.$game['game']['homeTeam']['Name'].'" style="max-width:80%"></td>'; 
      echo '<td>' . $game['game']['awayTeam']['Name'] . '</td>';
      echo '<td class="bold"> ' . $game['awayScore'] . ' - ' . $game['homeScore'] . ' </td>';
      echo '<td>' . $game['game']['homeTeam']['Name'] . '</td>';
      echo '<td><img src="images/used/sports/Untitled-3_14.png" alt="W3Schools.com" style="max-width:80%"></td>';
   } ?>
</tbody>
</table>

XML:

<div class="col-sm-3" >
    <h2 class="rightnow-title ">Right Now</h2><hr>
    <?php $i2=0; 
    foreach ($items2 as $item2) {
        if ($i2 < 4) {
            printf('<div class="right-now-box">');
            printf('<img src="%s" class="width-100">', $item2['image2']);
            printf('<a target="_blank" class="rightnow-text" href="%s">%s</a>', $item2['link2'], $item2['title2']);
            printf('</div>');
            $i2++;
        }
    } ?>
</div> 

还可以使用 XML 代码构建 IF 语句以使用不同的设计。 要么通过:使用另一个 XML 项目编号,只需将 foreach 语句更改为此 - foreach(range(6, 15) as $i) { //将 Item6 设置为 15。

或使用不同的设计 - 只是不要忘记在末尾使用“break”语句来结束 if 循环。

<?php
   $i=0; 
   foreach ($items as $item) {
    if ($i <= 0) {
      printf('<div class="top-news-flex-parent">');
      printf('<div class="top-news-item">');
      printf('<img class="sidebar-first-img" src="%s">', $item['image']);
      printf('<a target ="_blank" href="%s">%s</a><br>', $item ['link'], $item['title']);
      printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);?> <span class="date"> <?php 
      echo  $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
      printf('</div>');
      printf('</div>');
      $i++;
    } elseif ($i < 5) {
    if ($item['image'] == "N/A") {
        printf('<div class="top-news-flex-parent">');
        printf('<div class="top-news-item">');
        printf('<a href="%s">%s</a><br>', $item ['link'], $item['title']);
        ?> <span class="date"> <?php 
        printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);
        echo $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
        printf('</div>');
        printf('</div>');   
        $i++;
    } else {
        printf('<div class="top-news-flex-parent">');
        printf('<div class="top-news-imgtext" >');
        printf('<a href="%s">%s<a/><br>', $item ['link'], $item['title']);
        printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);
        ?> <br><span class="date"> <?php 
        echo $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
        printf('</div>');
        printf('<div class="top-news-img"><img src="%s"></div>', $item['image']);
        printf('</div>');
        $i++;
    }                           
    } else {
        break;
    }
} ?>

【问题讨论】:

    标签: php sql json postgresql


    【解决方案1】:

    JSON 文件是否有每个团队的 ID?您可以使用此 ID 与您在表中定义的 ID 相关联。

    另一种选择是根据团队名称生成唯一 ID。

    例如,您可以通过将所有字母转换为大写并将空格替换为下划线来转换团队名称。或者您制作团队名称的 MD5。无论哪种方式,您都可以使用此 ID 来匹配两者。

    【讨论】:

    • 我的想法是在 SQL 表 (alt-logo) 和 JSON (AWAYTEAM / HOMETEAM) 之间建立一个链接 - 如 .. SQL alt logo (Ducks) 也是 JSON hometeam/awateam (DUCKS) .如果这些值匹配。然后创建一个新数组,其中包含所有 JSON 值( awayteam、hometeam、homescore、awayscore )和 sql 值(图像和完整团队名称)。
    • 用更简单的方式来描述。已经有链接了。 SQL 具有与 JSON 的客队/主队相同的 alt-logo。所以我唯一要做的就是在 SQL 表中添加一个 img 链接,然后将它与 json 文件匹配。但我没有我想象的那么有经验,所以我需要一点帮助来写什么来实现这一点。
    • 我不能用这个作为答案,因为它没有为我提供任何关于如何进步的信息。不,它没有 ID 是我能做到的。抱歉,我之前忘记发布 json 文件了。
    • awayTeam 和 homeTeam 对象中的 ID 字段是什么?不是团队ID吗?
    • 嗯.. JSON : $game['game']['homeTeam']['Name'] 和 SQL nhl_team_logo['alt-logo'] 已经相同了。两者都给出了团队的缩写名称:例如.. Wild.. 并且 SQL 在 nhl_team_logo['logo'] 中也有该团队的徽标 url
    【解决方案2】:

    我的一个朋友解决了这个问题。我提供了足够的代码。这是一个相当长的答案,我提供它的原因是.. 1.我想要一个很好的例子来寻找自己。所以不管怎样,我要这个副本。原因是,大多数教程、Stackoverflows 等,它们提供的代码很少,但它仅用于一个功能。如果你读一本书,你需要整个部分,而不仅仅是乱码。这就是为什么一个完整的理解和代码片段对于理解代码是必不可少的,如果你不这样做的话。当这对你没有任何帮助时。

    因此,我在这里提供了从 Feed(XML 和 JSON)创建新闻项目和体育项目的代码。解析它们。创建数组并在网站上显示它们+数据库连接教程包括在内。以及如何将 SQL 与 JSON 结合使用以在两者之间建立连接。你太受欢迎了!

    结果将是这样的。

    1. 创建数据库连接。我在 /config/db.php 中使用它。也不在乎你看到我的登录凭据只是在本地主机上。

    DB.PHP

    $dbhost = 'localhost';
    $dbport = 5432;
    $dbname = 'acme';
    $dbuser = 'devuser';
    $dbpass = '123456';
    
    $con = pg_connect("host=".$dbhost." port=".$dbport.". 
        dbname=".$dbname." user=".$dbuser." password=".$dbpass);
    

    2. 为您的 XML RSS FEED 连接制作一个文件(我使用 NYT RSS Feed)。我叫我的 rss-feeds.php

    RSS-FEEDS.PHP

    <?php
    
        //Gets RSS FEEDs
        $url = "http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"; // xmld.xml contains above data
        $feeds = file_get_contents($url);
        $rss = simplexml_load_string($feeds);
    
        //Creates Array
        $items = [];
    
        //Loop Feed Objects (images, description) into Array  as they are Media: tags and harder to get.
            foreach($rss->channel->item as $entry) {
            $image = '';
            $image = 'N/A';
            foreach ($entry->children('media', true) as $k => $v) {
                $attributes = $v->attributes();
    
                if (count($attributes) == 0) {
                    continue;
                } else {
                    $image = $attributes->url;
                }
            $content_data = (string)$entry->children("media", true)->description;
            $credit = (string)$entry->children("media", true)->credit;
            $creator = (string)$entry->children("dc", true)->creator;
            $pubDate = (string)$entry->pubDate;
            $pubDate = preg_split('/[\s,]+/', $pubDate);
    
    
            }
    
            //Not sure.. guess it find the last two rss feed obects - Title and Link. 
            $items[] = [
                'link' => $entry->link,
                'title' => $entry->title,
                'image' => $image,
                'creator' =>$creator,
                'pubDate' =>$pubDate,
            ];
    
        }
    
    ?>
    

    3. 为您的 Sports JSON 连接创建一个文件(我使用 https://www.mysportsfeeds.com/)。我叫我的sports-json.php。 .

    SPORTS-JSON.PHP

    <?php
    error_reporting(E_ALL);
    
    $url = 'https://www.mysportsfeeds.com/api/feed/pull/nhl/2017-playoff/scoreboard.json?fordate=20170416';
    
    $username = 'username';
    $password = 'password';
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
    //curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    //curl_setopt($ch, CURLOPT_REFERER, $url);
    
    
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
    
    $result = curl_exec($ch);
    $info = curl_getinfo($ch);
    $nhl=json_decode($result,true);
    curl_close($ch);
    
    
    ?>
    

    4. 在 Index.php -(网站)中 - 包括 DB、Sports Feed (json) 和 RSS FEED (XML) 为 SQL DB TABLE 创建一个选择函数。我使用 Postgres。

    <?php
    include 'rss-feeds.php';
    include 'sports-json.php'; 
    include 'config/db.php'; //This is the database connection. 
    
     function getTeamLogos(){
        global $con;
        $logos = [];
        $a_query = "SELECT logo, team FROM nhl_team_logo;";
        $a_result = pg_query($con, $a_query) or die("Cannot execute");
        $placeholder_logo = 'placeholder.jpg';
        if(pg_num_rows($a_result ) > 0) {
            while ($row = pg_fetch_assoc($a_result )) {
                $logos[$row['team']] = ($row['logo'] ? $row['logo'] : $placeholder_logo);
            }
        }
        return $logos;
    }
    ?>
    

    5. 最后,在 (index.php) HTML 代码中使用 json、xml 和 sql。我提供了一种演示如何使用这三个中的每一个。

    JSON 和 SQL:

    <?php $logos = getTeamLogos();?>
    <table class="table">
    <tbody>
    <?php
       foreach ($nhl['scoreboard']['gameScore'] as $game) {
           echo '<tr>';
           echo '<td><img src="'.$logos[$game['game']['homeTeam']['Name']].'" alt="'.$game['game']['homeTeam']['Name'].'" style="max-width:80%"></td>'; 
          echo '<td>' . $game['game']['awayTeam']['Name'] . '</td>';
          echo '<td class="bold"> ' . $game['awayScore'] . ' - ' . $game['homeScore'] . ' </td>';
          echo '<td>' . $game['game']['homeTeam']['Name'] . '</td>';
          echo '<td><img src="images/used/sports/Untitled-3_14.png" alt="W3Schools.com" style="max-width:80%"></td>';
       } ?>
    </tbody>
    </table>
    

    XML:

    <div class="col-sm-3" >
        <h2 class="rightnow-title ">Right Now</h2><hr>
        <?php $i2=0; 
        foreach ($items2 as $item2) {
            if ($i2 < 4) {
                printf('<div class="right-now-box">');
                printf('<img src="%s" class="width-100">', $item2['image2']);
                printf('<a target="_blank" class="rightnow-text" href="%s">%s</a>', $item2['link2'], $item2['title2']);
                printf('</div>');
                $i2++;
            }
        } ?>
    </div> 
    

    还可以使用 XML 代码构建 IF 语句以使用不同的设计。 要么通过:使用另一个 XML 项目编号,只需将 foreach 语句更改为 - foreach(range(6, 15) as $i) { //gives Item6 to 15.

    或使用不同的设计 - 只是不要忘记在末尾使用“break”语句来结束 if 循环。

    <?php
       $i=0; 
       foreach ($items as $item) {
        if ($i <= 0) {
          printf('<div class="top-news-flex-parent">');
          printf('<div class="top-news-item">');
          printf('<img class="sidebar-first-img" src="%s">', $item['image']);
          printf('<a target ="_blank" href="%s">%s</a><br>', $item ['link'], $item['title']);
          printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);?> <span class="date"> <?php 
          echo  $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
          printf('</div>');
          printf('</div>');
          $i++;
        } elseif ($i < 5) {
        if ($item['image'] == "N/A") {
            printf('<div class="top-news-flex-parent">');
            printf('<div class="top-news-item">');
            printf('<a href="%s">%s</a><br>', $item ['link'], $item['title']);
            ?> <span class="date"> <?php 
            printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);
            echo $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
            printf('</div>');
            printf('</div>');   
            $i++;
        } else {
            printf('<div class="top-news-flex-parent">');
            printf('<div class="top-news-imgtext" >');
            printf('<a href="%s">%s<a/><br>', $item ['link'], $item['title']);
            printf('<span class="reporter">%s</span><span class="date"></span>', $item['creator']);
            ?> <br><span class="date"> <?php 
            echo $item['pubDate'][1]; ?> <?php echo $item['pubDate'][2]; ?> <?php echo $item['pubDate'][3];
            printf('</div>');
            printf('<div class="top-news-img"><img src="%s"></div>', $item['image']);
            printf('</div>');
            $i++;
        }                           
        } else {
            break;
        }
    } ?>
    

    【讨论】:

      猜你喜欢
      • 2021-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-18
      • 2018-01-31
      • 1970-01-01
      • 1970-01-01
      • 2017-06-22
      相关资源
      最近更新 更多