"함수 strtr()"의 두 판 사이의 차이

(새 문서: 분류: String ==PHP== 분류: PHP <source lang='PHP'> $trans = array("h" => "-", "hello" => "hi", "hi" => "hello"); echo strtr("hi all, I said hello", $trans); // hello all,...)
 
3번째 줄: 3번째 줄:
==PHP==
==PHP==
[[분류: PHP]]
[[분류: PHP]]
*http://php.net/manual/en/function.strtr.php
<source lang='PHP'>
<source lang='PHP'>
$trans = array("h" => "-", "hello" => "hi", "hi" => "hello");
$trans = array("h" => "-", "hello" => "hi", "hi" => "hello");
8번째 줄: 9번째 줄:
// hello all, I said hi
// hello all, I said hi
</source>
</source>
==같이 보기==
*[[함수 str_replace]]

2015년 3월 9일 (월) 02:01 판


1 PHP

$trans = array("h" => "-", "hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello", $trans);
// hello all, I said hi

2 같이 보기

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