note 128618 added to function.preg-split
| From: | mohamedn085 at gmail dot com | Date: | Fri, 16 Jun 2023 17:40:32 +0000 |
| Subject: | note 128618 added to function.preg-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220576@lists.php.net to get a copy of this message | ||
you can use this function to reverse texts :
function text_rev($text)
{
return
implode('',array_reverse(preg_split('//',$text,-1,PREG_SPLIT_NO_EMPTY)));
}
var_dump(text_rev('hallo')); // output: ollaH
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 102.40.245.107)
----
Manual Page -- https://php.net/manual/en/function.preg-split.php
Edit -- https://main.php.net/note/edit/128618
Del: integrated -- https://main.php.net/note/delete/128618/integrated
Del: useless -- https://main.php.net/note/delete/128618/useless
Del: bad code -- https://main.php.net/note/delete/128618/bad+code
Del: spam -- https://main.php.net/note/delete/128618/spam
Del: non-english -- https://main.php.net/note/delete/128618/non-english
Del: in docs -- https://main.php.net/note/delete/128618/in+docs
Del: other reasons-- https://main.php.net/note/delete/128618
Reject -- https://main.php.net/note/reject/128618
Search -- https://main.php.net/manage/user-notes.php