Jump to content

[SOLVED] help with functions


Archadian

Recommended Posts

when you write a function you want to pass it some information to work with, lets start with a simple function

<?php

function addNumbers($arg1, $arg2)
{
$answer = $arg1 + $arg2;
return $answer;
}

//run this function

echo addNumbers(3,4); //would print out 7
?>

 

 

edit: hopefully didnt simplify it too much....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.