title: PHP function if function == true
body: <p>Hello i have problem with the odd or even, i want to do function on that i have this and im getting error: <em>Parse error: syntax error, unexpected 'spocti' (T_STRING), expecting '(' in C:\xampp\htdocs\functions.php on line 34</em>
  i have this code </p>
  
  <pre><code>&lt;form method= "post" action= ""&gt;
      &lt;input type= "text" name= "cislo" /&gt;
      &lt;input type= "submit" name= "submit" /&gt;
   &lt;/form&gt;
  
      &lt;?php
          if (isset($_POST['cislo'])){
  
              $cislo = $_POST['cislo'];
  
              function spocti(){
                  if ($cislo % 2 == 0)
                  return true;
              }
          }
          if (function spocti == true){
              echo "Its even";
          }
       ?&gt;
  </code></pre>