Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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;
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #return #function #result #variable
ADD COMMENT
Topic
Name
5+2 =