B
B
Buripov2015-11-16 18:15:20
PHP
Buripov, 2015-11-16 18:15:20

PHP, how to select words following a known word?

For example, many people love to walk, need to bring out love to walk, how to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Buripov, 2015-11-16
@Buripov

$str = 'we all tend to dislike someone';
if (preg_match('/\bus\b\W*\b(.+)/iu', $str, $match)) {
$word = $match[1];
}
Thanks 27cm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question