跑马灯中信息显示的问题
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<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>
<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=”
- ” ;
- “.$name.”*** “.substr($show_info[“telephone”] ,0 ,7).”****
$html_info .=”
” ;
$html_info .=”
” ;
}while($show_info=mysql_fetch_array($show_mysql)) ;
?>
<?php
echo $html_info;
?>
</marquee>