title: What's a good structure for an edit function in which all parameters are optionals?
body: <p>Let's get it simple, a table with three parameters (A, B and C). <code>A</code> is the key and is not editable, but <code>B</code> and <code>C</code> can be modified.</p>
  
  <p>What's the best way of defining an editing function? Because what I have so far is...</p>
  
  <pre><code>function edit($b, $c){
      if {($b != "") &amp;&amp; ($c != "")){
          update($b, $c);
      }elseif ($b != ""){
          update($b);
      }elseif ($c != ""){
          update($c);
      else {
          die("Anything to edit")
      }
  }
  </code></pre>
  
  <p>In this case it's not kind of a big deal, but what if instead of two parameters there are 10 optional parameters? I'm pretty sure there must be some better way of defining such function.</p>