php explode() 함수 explode("기준이될 문자","문자열");
사용 예
<?
$strtxt="muniman%Hello%php";
$arr=explode("%",$strtxt);
echo $arr[0]; //muniman
echo $arr[0]; //Hello
echo $arr[0]; //php
?>
문자열중 기준이될 문자혹은 반복이 되는 문자로 글자를 사른후 배열로 만들어준다 !!
'PHP' 카테고리의 다른 글
[PHP]html 태그를 제거해 주는 strip_tags()함수 (0) | 2018.03.21 |
---|---|
[PHP] html 태그를 그대로 출력하는 htmlspecialchars() 함수 (0) | 2018.03.21 |
[PHP]문자열 치환 str_replace() 함수 (0) | 2018.03.20 |
[PHP] 문자열 자르는 substr() 함수 (1) | 2018.03.19 |
[PHP]br태그를 붙여주는 nl2br (0) | 2018.03.18 |