<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
body{
margin:0px;
padding:0px;
text-align:center;
}
#right{
margin:0px auto;
padding:0px;
text-align:center;
}
ul,li{
margin:0px;
padding:0px;
}
#right li{
list-style:none;
}
</style>
</head>
<body>
<?php
include_once("conn.php") ;
$show_sql="select username ,telephone from enlist_table order by enlist_id desc limit 10" ;
$show_mysql=mysql_query($show_sql) or die("Could not query".mysql_error()) ;
$show_info=mysql_fetch_array($show_mysql) ;
function fun($str){
$tmpstr="" ;
if(ord(substr($str ,0 ,1))>0xa0){
$tmpstr.=substr($str ,0 ,2) ;
}
else{
$tmpstr.=substr($str ,0 ,1) ;
}
return $tmpstr ;
}
do{
//var_dump($show_info["telephone"]) ;
$name=fun($show_info["username"]) ;
$html_info="<ul>" ;
$html_info .="<li>".$name."*** ".substr($show_info["telephone"] ,0 ,7)."****</li>" ;
$html_info .="</ul>" ;
}while($show_info=mysql_fetch_array($show_mysql)) ;
?>
<div id="right">
<marquee behavior=scroll direction=up align=middle border=1 width=440 height=230 id="logo" onmouseout="logo.start()" onmouseover="logo.stop()">
<?php
echo $html_info;
?>
</marquee>
</div>
</div>
</body>
</html>
<?php
mysql_close() ;
?>
页面运行的时候,应该会有几条信息在跑动,用var_dump()函数进行输出,会有几条结果,但是跑灯的时候,怎么就只有一条呀!急,谢谢。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
body{
margin:0px;
padding:0px;
text-align:center;
}
#right{
margin:0px auto;
padding:0px;
text-align:center;
}
ul,li{
margin:0px;
padding:0px;
}
#right li{
list-style:none;
}
</style>
</head>
<body>
<?php
include_once("conn.php") ;
$show_sql="select username ,telephone from enlist_table order by enlist_id desc limit 10" ;
$show_mysql=mysql_query($show_sql) or die("Could not query".mysql_error()) ;
$show_info=mysql_fetch_array($show_mysql) ;
function fun($str){
$tmpstr="" ;
if(ord(substr($str ,0 ,1))>0xa0){
$tmpstr.=substr($str ,0 ,2) ;
}
else{
$tmpstr.=substr($str ,0 ,1) ;
}
return $tmpstr ;
}
do{
//var_dump($show_info["telephone"]) ;
$name=fun($show_info["username"]) ;
$html_info="<ul>" ;
$html_info .="<li>".$name."*** ".substr($show_info["telephone"] ,0 ,7)."****</li>" ;
$html_info .="</ul>" ;
}while($show_info=mysql_fetch_array($show_mysql)) ;
?>
<div id="right">
<marquee behavior=scroll direction=up align=middle border=1 width=440 height=230 id="logo" onmouseout="logo.start()" onmouseover="logo.stop()">
<?php
echo $html_info;
?>
</marquee>
</div>
</div>
</body>
</html>
<?php
mysql_close() ;
?>
页面运行的时候,应该会有几条信息在跑动,用var_dump()函数进行输出,会有几条结果,但是跑灯的时候,怎么就只有一条呀!急,谢谢。
解决方案 »
- I want this form "xxx","xxx","xxxx".
- PHPZip:不能新建文件 ,因为没有写权限,请修改权限
- 定义变量:$patch="http://www.xxx.com/前线www.xxx.com/实际显示前线中文字变??Dzǰϟ乱码
- 数据库内遇到相同的数据,就覆盖,代码如何实现,用什么函数
- form表单提交后 如果执行失败,返回前页面,表单不刷新 如何实现
- php网站访问异常,服务器在客户机房,正常运行,但是客户那边无法正常操作系统!
- 关于mysql数据导入的问题
- 你说这怪不怪,谁能帮俺????
- PHP文件怎么打开是乱码?难道PHP支持编译?
- mysql语句的问题
- 关于php推送消息的问题
- zend studio中让源代码对齐的快捷键是什么?
do{
$html_info="<ul>" ;
//var_dump($show_info["telephone"]) ;
$name=fun($show_info["username"]) ;
$html_info .="<li>".$name."*** ".substr($show_info["telephone"] ,0 ,7)."****</li>" ;
}while($show_info=mysql_fetch_array($show_mysql)) ;
$html_info .="</ul>" ;