Search code examples
phparraysvar-dump

would this vardump function work?


$myarray = array("search1", "search2");

if(var_dump($myarray) == array){
  //do something
}

I was just curious if this if statement would return true ever


Solution

  • var_dump doesn't return anything, is_array is probably the function you're looking for.