サイトに食べログのように個々の店舗の画像を掲載したいです。僕は現在yahoo!のapiを使って個々の店舗情報を取得しています。xml経由でphpファイルにyahoo!のapiのコードを書きましたが、題名の通りいざwordpressに作成したphpファイルを表示してみると画像が画像として表示されずurlとして表示されます。食べログみたいに店舗の画像を表示するにはどうすればいいですか?
PHP
1$html = ' <tr><th>店舗名</th><th>読み</th><th>電話番号</th><th>住所</th><th>路線</th><th>最寄駅</th><th>PCUrl</th></tr> 2 <tr><td>%1$s</td><td>%2$s</td><td><a href=tel:\"%3$s\"></a></td><td>%4$s</td><td>%5$s</td><td>%6$s</td><td><a href=%7$s>サイトはこちら</a></td><td><a href=\"%8$s\"</td></tr>'; 3 $i = 1; 4foreach ( $xml->Feature as $key => $item ) { 5 6 printf( $html, $item->Name, $item->Property->Yomi, $item->Property->Tel1, $item->Property->Address, $item->Property->Station->Railway, $item->Property->Station->Name . '駅', $item->Property->Detail->PcUrl1,$item->Property->Detail->Image1);
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/05/17 10:33
2016/05/18 15:10