[PHP] I can't figure this error!

Hello

I’m just trying to be some of the basics. I’m trying to say if the v in the url equals 1 then display 1. And so on through the rest of the code. Can you help?

This code just doesn’t come out right!


 <?php
 
 $v = $_GET['v'];
 
 if ($v = '1') {
    $msg = "1";
 } else if ($v = '2') {
    $msg = "2";
 } else if ($v = '3') {
    $msg = "3";
 } else if ($v = '4') {
    $msg = "4";
 } else if ($v = '5') {
    $msg = "5";
 } else {
    $msg = "Add a ?v= and a number in between 1 and 5!";
 }
 
 echo $msg;
 
 ?>
 

Please reply back

~Ron