diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-08-13 09:52:35 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-08-13 09:52:35 +0000 |
commit | 2e25ad5458f3a50270533f2800f82268e138bfe0 (patch) | |
tree | cf8db028582749a84847adbe6514edc76bc77578 /pmwiki.php | |
parent | 1c6a229cc97262a7e1527cc7e8721cdfd0d8c29a (diff) | |
download | pmwiki.svn-2e25ad5458f3a50270533f2800f82268e138bfe0.tar.bz2 |
Add helper function PRI(), update blocklist.php for PHP8.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4763 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'pmwiki.php')
-rw-r--r-- | pmwiki.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -846,6 +846,11 @@ function PRCB($pat, $repl, $subj, $vars=null, $limit=-1, &$count=null, $flags=0) return preg_replace_callback($pat, $repl, $subj, $limit, $count, $flags); return preg_replace_callback($pat, $repl, $subj, $limit, $count); } +function PRI($glue, $array) { ## Recursive implode + $out = array(); + foreach($array as $v) $out[] = is_array($v)? PRI($glue, $v) : $v; + return implode($glue, $out); +} ## This is a replacement for json_encode+PHSC, but only for arrays that ## are used by the PmWiki core. It may or may not work in other cases. |