This question already has an answer here:
- Are PHP short tags acceptable to use? 27 answers
I've been wondering what's the difference of using <? and <?php
. For example in this lines of code.
function getWallboard()
{
$.ajax({
type: "POST",
url: "quality_control/qc_ajax.php",
data: "action=get_queue_totals&wallboard=<? echo $_REQUEST['wallboard'];?>",
success: function(msg){
$("#queue_nav").fadeIn("fast");
$("#queue_nav").html(msg);
}
});
$.ajax({
type: "POST",
url: "quality_control/qc_ajax.php",
data: "action=getQCWallboard&qctype=<?php echo $_REQUEST['qctype'];?>&wallboard=<? echo $_REQUEST['wallboard'];?>",
success: function(msg){
$("#wallboard").fadeIn("fast");
$("#wallboard").html(msg);
}
});
}
I've been getting error for some instance. Like If I change <? to <?php or <?php to <?
, some of my code block doesn't work.
This is my first post. I hope I can get ideas about the use of this.
</div>