I am using netbeans php 7.3 and cant seem to solve this warning " Expected EOF but found } "
The code is below. Its in a php file.
<script type="text/javascript">
function downloadStats($filename,$album,$type){
$('#downloaddiv').html('<img src="images/ajax-loader.gif" />');
$.ajax({
type: 'POST',
url: 'download.php',
<?php
if($_GET['urltype']=='basketball'){
?>
data: "filename=" + $filename + "&album=" + $album + "&type=" + $type + "&area=source&uploadyear=<?php echo $uploadyear;?>",
<?php
} else {
?>
data: "filename=" + $filename + "&album=" + $album + "&type=" + $type + "&uploadyear=<?php echo $uploadyear;?>",
<?php
}
?>
<?php global $tag; ?>
success: function(msg) {
$('#downloaddiv').html('<b title="Stat available for download. Click HERE to download." ><?php echo $tag['view_013'];?> <?php echo $tag['view_014'];?> <a href="'+msg+'"><?php echo $tag['view_015'];?></a> <?php echo $tag['view_016'];?></b>');
}
}); <=== red circle/exclamation mark here
}
</script>
Netbeans throws up a red circle /exclamation mark on the second last line });
The php file is 600+ lines and so to make matters simple i pasted the code section into a new file and netbeans still threw an error at the same place });