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

15번째 줄: 15번째 줄:


==같이 보기==
==같이 보기==
*[[함수 substr_before]]
*[[함수 substr_from]]
*[[함수 substr_from]]
*[[함수 substr_until]]
*[[함수 substr_until]]
*[[함수 substr_before]]
*[[함수 substr]]
*[[PHP 함수 substr after, before, from, until]]
*[[PHP 함수 substr after, before, from, until]]

2015년 2월 20일 (금) 17:43 판


1 PHP

function substr_after($needle, $haystack) { return substr( strchr($haystack,$needle), strlen($needle) ); }

echo substr_after('ll', 'hello world');
echo substr_after('l', 'hello world');
echo substr_after('x', 'hello world'); // bool(false)
# o world
# lo world
#

2 같이 보기

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