I have a basic content swapper using JS and PHP. Everything was working fine until I noticed the script was echoing a number "1" after placing the results of the swap. There was no number one in my html, php includes, or scripts (that I could find.) Where the hell is it coming from and how can I get it to not appear.
JS
function swapContent(cv){
$("#workwrap").html(loadgif.gif).show();
var url = "includescripts/swapscript.php";
$.post(url,{contentVar:cv},function(data){
$("#workwrap").html(data).show();
});
}
PHP SCRIPT
<?php
$contentVar = $_POST['contentVar'];
if($contentVar == "logo"){
echo include("../workincludes/contA.php");
} else if($contentVar == "print"){
echo include("../workincludes/contB.php");
} else if($contentVar == "web"){
echo include("../workincludes/contC.php");
}
?>
HTML
<div id="content">
<div id="workwrap">
</div></div>