Considering sample data such as:
$str1 = "apple";
$str2 = "pal";
I want to return a true response only if all the characters [alphabetical characters] of the $str2 are also present in $str1, otherwise false.
Since all letters p, a, and l all exist in $str1, then result should be true.
If $str2 was pole, then the p, l, and e would be found, but the o would not. This scenario should return false.
My pseudo code is:
if (str2 is present in str1){
// true;
// since all characters of str2 are also in str1, so it should return true.
} else{
// false;
}