PHP配列をいくつかのdivクラスでhtmlに変換する必要があります。
これが私のコードです:
<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{ die('Could not connect: ' . mysql_error());
}
mysql_select_db("asd", $con);
$result = mysql_query("SELECT * FROM asd");
$something = array();
while ($row = mysql_fetch_assoc($result)) {
$something[] = array("title"=>$row['title'],
"name"=>$row['name'],
"content"=>$row['content'],
"image" =>
array(
"cls"=>"slide-image",
"_src"=>$row['src'],
"source"=>$row['source']
)
);
}
mysql_close($con);
?>
このような出力が欲しい
<div class="class1"> Here title goes</div>
Here name with some class
Here content with some class
何か助けてください?