Q: set a php value to be inserted in href as a get parameter on click of a link <li><a href="#myModal" data-toggle="modal" data-target="#myModal" data-code="<?php echo "carrer"?>">Career</a></li>

suppose this  is a link and I want to send the echoed value carrer to.....
<a class="text_center sign" title="one" href="rashu.php?test=axis"><img class="sign img-circle" src="images/icon/belier.png" alt=""><br>Axis</a>

career should be as after test=axis?carrer=<that echoed value.....>

A: You have two mistakes.


*

*echo a static string carrer which is not need to do.

*use " inside ", which is invalid.


Change 
data-code="<?php echo "carrer"?>" 
to 
data-code="carrer" or data-code="<?php echo 'carrer'?>"
Main problem Solution:
fiddle link
jQuery:
$(function(){
    var modal_class = $(".modal_class").attr('data-code');
    var sign = $(".sign").attr("href");

  $(".sign").attr("href", sign+"&test_carrer="+modal_class);
  alert($(".sign").attr("href"));
})

