PHP - calculate (Switch Case)
<p>I'm working on a little work on conversion but in reality I'm learning the switch case statement in PHP =D</p>

<p>When I select my country, I can applicate the good rate.</p>

<p><strong>Here is the HTML</strong></p>

<pre><code>&lt;select class="form-control" name="devise"&gt;
        &lt;option name="pays" value="USA"&gt;USA&lt;/option&gt;
        &lt;option name="pays" value="EUR"&gt;EUR&lt;/option&gt;
        &lt;option name="pays" value="JPY"&gt;JPY&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p><strong>Here is the PHP</strong></p>

<pre><code>if (isset($_POST['conversion'])){
if(!is_numeric($_POST['montant'])){
    echo('&lt;div class="alert alert-danger  style="display:none;"&gt;veuillez insérer un nombre&lt;/div&gt;');
    exit();
} else if(isset($_POST['pays'])){
    $devise = $_POST['devise'];
    $montant = $_POST['montant'];
    switch($pays){
        case 'USA':
            $resultConvert = $montant *  1.3;
            echo('&lt;div class="alert alert-success"  style="display:none; role="alert"&gt;dollar&lt;/div&gt;');
            break;
        case 'EUR':
            $resultConvert = $montant * 1.2;
            echo('&lt;div class="alert alert-success" style="display:none; role="alert"&gt;euro&lt;/div&gt;');
            break;
        case 'JPY':
            $resultConvert = $montant * 1.5;
            echo('&lt;div class="alert alert-success"  style="display:none; role="alert"&gt;yen&lt;/div&gt;');    
            break;
        default:
            echo('&lt;div class="alert alert-danger style="display:none;"&gt;Veuillez choisir une devise&lt;/div&gt;');
    }
    return $resultConvert;
} 
</code></pre>

<p>}
I wanted to return $resultConvert, but I don't have errors from the server. I tried to var_dump() it, but It displays nothing.</p>

<p>Thank you for your help. I want to learn where I did a mistake.</p>

<p>P.S. The rates of convertion are wrong, I just want to display the good result with the good device.</p>