PHP: make a function
<pre><code>function fullname($id){
$query = mysql_query("SELECT firstname, lastname FROM users WHERE id = '$id'");
$row = mysql_fetch_array($query);
$full_name = $row["firstname"] . " ".$row["lastname"];

return $full_name;
}
</code></pre>

<p>I want to grab firstname and lastname, put them together, and then echo it back, is this right?</p>
