티스토리 뷰

str_replace(원본, 치환, 작업문자열); 

 

str_replace("사", "가", $value); 

 

---------------------------------------------------------------------

 

■ strpos($str, $check) - $str 문자열에 $check 문자열이 포함되었는지 확인 ( true / false ) - 대소문자를 구별하지 않는다.
ex)
if(strpos($str, $check)){}else{}
 
■ $result = ereg_replace($check, $replace, $str) - $str 에서 $check 를 체크하여 $replace 로 대체하여 $result 에 저장한다. - 대소문자를 구별하지 않는다.

Total
Today
Yesterday
최근에 올라온 글
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31