+ 1

Check if a variable can be created from a random letter string using PHP

<?php $randomstring = 'raabccdegep'; $arraylist = array("car", "egg", "total"); ?> Above '$randomstring' is a string which contain some alphabet letters. And I Have an Array called '$arraylist' which Contain 3 Words Such as 'car' , 'egg' , 'total'. Now I need to check the string Using the words in array and print if the word can be created using the string. For Example I need an Output Like. 'car' is possible. 'egg' is not possible. 'total' is not possible.

5th Apr 2018, 1:37 AM
Adharsh M
Adharsh M - avatar
1 Answer
5th Apr 2018, 1:43 AM
Adharsh M
Adharsh M - avatar