Jump to content
  • 0

Нубский вопрос


Victor Ananiev
 Share

Question

Почему когда использую вот этот код:

<?
$connect=mysql_connect("&&&&&","&&&&&&&&","&&&&&&")or die(mysql_error());
$db=mysql_select_db("forum",$connect)or die(mysql_error());
$query="SELECT subject FROM `topics`";
$topics_subj=mysql_query($query,$connect);
$topics=array();
while($topic=mysql_fetch_array($topics_subj))
{
$topics[]=$topic;
}
foreach($topics as $arr)
{
foreach($arr as $value)
{
echo $value."
";
}
}
?>

Выводится вот это:

Тестовая тема
Тестовая тема
hello
hello
aosigo[agj
aosigo[agj
Hello
Hello
iaepjapg
iaepjapg
iaepjapg
iaepjapg
Приветик
Приветик
Приветик
Приветик

Тоесть каждая тема выводится 2 раза.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy