how can creat function like this?
<p>i want to create function like this. please help me to complete my function
if both are +ve</p>

<pre><code>$a = 10;
$b = 6;
// do nothing just show same value 10 and 6 
// if $b is negetive
$a = 10;
$b = -3;
// get the value from $a show the value 7 (10 - 3)
// 0 if $a is negative 
$a = -2;
$b = 6;
// (little bit diffrent) get the double form $b of negative value and
// show the value 0 and 2(6-4)
</code></pre>

<p>i have tried with this but totally stopped at else code</p>

<pre><code>// $a = something;
// $b = something;

if ($a &gt;0 &amp;&amp; $b &gt;0) {
  echo $a.' , '.$b;
}else{ 
  // what? what? what?
} 
</code></pre>
