PHP reads the MYSQL contents into two-dimensional arrays and outputs them according to the specified column.

time:13-06-21 forum:PHP tools and code
  Reproduced from http://www.68design.net/Development/PHP/19076-1.html

[code] <
$host =.Quot; localhost.quot; / / / / / / host name
$user =.Quot; root.quot; Ables =.Quot; mclass.quot; / / / / / table name

$conn=mysql_connect (.Quot; $host.quot;.Quot; $user.quot;.Quot; $password.quot;); Y ($query, $conn);
$i=0;
$j=0;
while ($row=mysql_fetch_row ($result)). Uot; < br >.Quot;;
if ($j==3) {
$i;
$j=0;
} //else; / / / / obtained is the number of data within the array.

$rows=2; / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / Quot;;
}
echo.Quot; < p >.Quot;
}

/*
display results for
>? >? >? >?

prev:How do you grab and analyze the page? next:PHP opens TXT, writes to Mysql, involves...
post comment
Notice



approved   39 years old as a girl! Takizawa Mak...   Have you ever eaten steamed pagoda f...   93 year old math professor returns t...   Good dad's 7 standards, all perfect!   The son spoke softly, afraid of skin...
rand   Discuz! "I'm sorry, you are not inst...   JS array usage description   PHP disables COOKIE to get SESSION   Analysis of PHP cookie and session   A brief description of the differenc...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com