diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-04-17 15:46:41 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-04-17 15:46:41 +0200 |
commit | 5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba (patch) | |
tree | 086d3542a0ec7c3b0e8aeb0ae5d62d7067409bb3 /fn | |
parent | 899a4bd60570ff9b77fabe89dd4902f09bbdeb47 (diff) | |
download | wcms-5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba.tar.gz wcms-5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba.zip |
title intro lien
Diffstat (limited to 'fn')
-rw-r--r-- | fn/fn.php | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -34,5 +34,23 @@ function head($title) } +function search($haystack, $debut, $fin) +{ + $list = []; + + $indexdebut = strpos($haystack, $debut); + if ($indexdebut !== false) { + $indexdebut += strlen($debut); + $indexfin = strpos($haystack, $fin, $indexdebut); + if ($indexfin !== false) { + array_push($list, substr($haystack, $indexdebut, $indexfin - $indexdebut)); + $haystack = substr($haystack, $indexfin); + $list = array_merge($list, search($haystack, $debut, $fin)); + } + } + return $list; + +} + ?> |