제목 출력으로 PHP 코드에 문제가 있습니다."space"로 단어를 분리하는 방법 : (example1, example2, ...) ~ (example1, example2, ...)
예 : 이 같은 제목의 단어가있는 경우 : "예 1, 예 2, 예 3, Example4를 ..."이 제목 내 클라우드 DIV 스타일을 확장합니다.
출력 . $ row [ 'title']. shoud 단어가 example1, example2, example3에서 example1, example2, example3 ...과 공백으로 구분되어 있지만 단어가 없습니다. 이 코드를 변경하면 어떻게 될까요?
감사합니다.
<?php
function print_cloud()
{ global $use_ads_scrl; $res=""; if ($use_ads_scrl=="yes"){$res=print_cloud2();} return $res; }
function print_cloud2()
{
global $table_ads, $HTTP_GET_VARS;
$city_sch="";
if ($HTTP_GET_VARS['city']!=""){$city_sch="and city='".$HTTP_GET_VARS['city']."' ";}
$sql_query="select * from $table_ads where (adcommkey is null or adcommkey=0) and visible=1 $city_sch
order by RAND() limit 10";
$sql_res=mysql_query("$sql_query");
$min = '10'; // Minimum font size in pixel.
$max = '22'; // Maximum font size in pixel.
$k1=""; $html_res="";
while ($row = mysql_fetch_array($sql_res)){
$k1="1";
if($row['adphotos']=='yes'){$check_ph=$photo_mark;} else {$check_ph="";}
$html_res=$html_res."
<a style='font-size:".rand($min,$max)."px; font-family:tahoma,sans-serif;'
class=\"tag_cloud\"
href='index.php?md=details&id= ".$row['idnum']." '> ".$row['title']." </a>
";
}
$html_res="
$html_res
";
if ($k1==""){$html_res="";}
return $html_res;
}
?>
있습니까? – Peon