Custom in_array function in PHP

PHOTO EMBED

Mon Apr 12 2021 14:02:26 GMT+0000 (UTC)

Saved by @beknaji #php

<?php
# BEKZOD NAJMIDDINOV bekturk333@gmail.com 
# custom in_array function in PHP
function c_in_array($n,$arr)
{
    foreach($arr as $item)
    {
        if(is_array($item)) return c_in_array($n,$item);
        
        if($n == $item) return true;
    }
    return false;
}
content_copyCOPY

You can check any array with this custom in_array function