Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Randomize string characters

Tags:

php

I'm looking for a function to change the characters order in a string.

For example, I have this string : "How are you?" , calling the function with this string as parameter would return something like: "wuayero Ho?" or something similar.

like image 935
RedhopIT Avatar asked Mar 09 '26 02:03

RedhopIT


1 Answers

PHP has a handy str_shuffle function for that

like image 168
Zoltan Toth Avatar answered Mar 11 '26 17:03

Zoltan Toth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!