Closed mateiacd closed 7 years ago
When I test eslint index.php
I get the following error 16:38 error Parsing error: Unexpected token e
The index.php is this and is also attached in a zip file
<!DOCTYPE html> <html> <head> <title>PHP test</title>
<!DOCTYPE html>
<html>
<head>
<title>PHP test</title>
<?php $my_array = array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow","e"=>"purple"); ?>
<?php
$my_array = array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow","e"=>"purple");
?>
<script type="text/javascript">
function OnLoadPage() { var x = "<?php echo $my_array["e"]; ?>"; alert("OnLoadPage '" + x+ "' "); } </script>
function OnLoadPage()
{
var x = "<?php echo $my_array["e"]; ?>";
alert("OnLoadPage '" + x+ "' ");
}
</script>
</head>
<body onload="OnLoadPage();"> </body>
<body onload="OnLoadPage();">
</body>
`
When I test eslint index.php
I get the following error 16:38 error Parsing error: Unexpected token e
The index.php is this and is also attached in a zip file
<!DOCTYPE html>
<html>
<head>
<title>PHP test</title>
<?php
$my_array = array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow","e"=>"purple");
?>
<script type="text/javascript">
function OnLoadPage()
{
var x = "<?php echo $my_array["e"]; ?>";
alert("OnLoadPage '" + x+ "' ");
}
</script>
</head>
<body onload="OnLoadPage();">
</body>
`