大家好,我需要获取行并显示它们。这不是一个问题,但是!我有一个列图标,其中包含图标的url,因此我应该显示url中的图像。你能告诉我怎么显示那个图像吗?
<?php
global $wpdb;
// this adds the prefix which is set by the user upon instillation of
wordpress
$table_name = $wpdb->prefix . "tablename";
// this will get the data from your table
$retrieve_data = $wpdb->get_results( "SELECT * FROM $table_name" );
?>
<ul>
<?php
foreach ($retrieve_data as $retrieved_data){ ?>
<div class="innerApp">
//THIS IS THE PROBLEMATIC LINE
<img class="appLogo" src="<?php bloginfo(\'template_url\') ?><?php
echo $retrieved_data->icon?>">
<p class="justTextTextApp"><?php echo $retrieved_data->NAME?></p>
<p class="justDescription"><?php echo $retrieved_data->description?>
</p>
</div>
<?php
}
?>
</ul>