Help with PHP/HTML Foreach loop and array


Hi! i have an issue with using the “stristr” in the foreach loop. I want to loop trough an array, and get the values in to a new array if one or more letters are contained in the “v2” array. so for instance if $a=“C” then “$funn” would contain all the elements witch contains the letter “C”. like “BTC”, and “LTC” and so on. can anybody help?
v2 = array(
“BTC” => Array(
“navn” =>“Bitcoin”,
“ETH” => Array(
“LTC” => Array(
“navn”=> “Litecoin”,
“k1”=> 62,
“XMR” => Array(
“XRP” => Array(
“navn”=> “Ripple”,

foreach($v2 as $key => $leteord){

if (stristr($a, $key)=== true) {

echo “

print_r ($funn);
echo “


You have some things backwards.


Thank you so much! You made my day :smiley: