다음과 같은 문자열이 있습니다.
$str = "it, is, a, test";
자, 나는 이것을 원합니다 : (구분자는 ,
)
<small>
<a href='#'>it</a>
<a href='#'>is</a>
<a href='#'>a</a>
<a href='#'>test</a>
</small>
어떻게 할 수 있습니까?
그냥 explode ..
$str = "it, is, a, test";
$res = explode( ', ', $str );
echo "<small>";
foreach($res as $result){
echo "<a href='#'>" . $result . "</a>";
}
echo "</small>";
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다