Answers for "php return function result to variable"

PHP
0

php return function result to variable

You can create function in php this way:

<?php

$name = array("ghp", "hamid", "amin", "Linux");
function find()
{
    $find = 0;
    if(in_array('hamid', $name))
    {
      $find = 1;
      return $find;
    }
    else 
    {
      return $find;
    }
}


//###################
$answare = find();
echo $answare;
?>
Posted by: Guest on October-21-2021

Code answers related to "php return function result to variable"

Browse Popular Code Answers by Language