"PHP explode()"의 두 판 사이의 차이

7번째 줄: 7번째 줄:
print_r($pieces);
print_r($pieces);
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='php' run>
$str = 'one|two|three|four';
$str = 'one|two|three|four';
print_r(explode('|', $str, 2));
print_r(explode('|', $str, 2));
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='php' run>
$str = 'one|two|three|four';
$str = 'one|two|three|four';
print_r(explode('|', $str, -1));
print_r(explode('|', $str, -1));

2022년 12월 19일 (월) 03:18 판

1 개요

PHP explode()
$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
print_r($pieces);
$str = 'one|two|three|four';
print_r(explode('|', $str, 2));
$str = 'one|two|three|four';
print_r(explode('|', $str, -1));

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}