PHP - English

Shuffle characters with PHP

<?PHP

 

A rather fun function you can use is str_shuffle( ). What this does
is to shuffle all the characters in a string. You can use this to create a
quick anagram programme. Try this script:

<?PHP

$full_name = ‘anagram’;

$full_name = str_shuffle($full_name);

print $full_name;

?>

Only three lines long, but the function takes a variable or direct text and
shuffles the characters around.

Next up, something a little more useful – Finding one
string inside of another.

.medrectangle-1-multi-102{border:none!important;display:block!important;float:none!important;line-height:0;margin-bottom:2px!important;margin-left:0!important;margin-right:0!important;margin-top:2px!important;min-height:250px;min-width:300px;padding:0;text-align:center!important}

|

Kaynak : https://www.homeandlearn.co.uk/php/php7p3.html ‘sitesinden alıntı

Yorum Yap