I have this php code and i want to print the results in the web page,nothing appears in it but everything works fine when i run it in the command Line

```
<html>
<head>
<title>hello</title>
</head>
<body>
<?php
$str =exec("python mainsummy.py",$output,$return_var);
#return_var int
#output array
var_dump ($output);
print_r($output);
echo "the 4 element \n";
echo $output[4];
print $output[4];
?>
</body>
</html>

```

this is what appears in the web page:

```
array(0) { } Array ( ) the 4 element

```

and here is what appears in the CLI:

```
<html><head><title>hello</title></head><body>array(5) {  [0]=>  string(269) "De jure (/dᵻ ˈdʒʊəriː/, /deɪ-/; Classical Latin: de iure [deː ˈjuːrɛ]) is an expression that means \"of right, by right, according to law\" (literally \"from law\"), as contrasted with de facto, which means \"in fact, in reality\" (literally \"from fact\")."  [1]=>  string(150) "The terms de jure and de facto are used instead of \"in law\" and \"in practice\", respectively, when one is describing political or legal situations."  [2]=>  string(178) "In a legal context, de jure is contrasted to de facto practices, where, for example, the people obey a contract as though there were a law enforcing it, yet there is no such law."  [3]=>  string(95) "Ahmad, however, was in practice (de facto) the actual Sultan, and his brother was a figurehead."  [4]=>  string(117) "Thus, Egypt was by Ottoman law de jure a province of the Ottoman Empire, but de facto was part of the British Empire."}Array(    [0] => De jure (/dᵻ ˈdʒʊəriː/, /deɪ-/; Classical Latin: de iure [deː ˈjuːrɛ]) is an expression that means \"of right, by right, according to law\" (literally \"from law\"), as contrasted with de facto, which means \"in fact, in reality\" (literally \"from fact\").    [1] => The terms de jure and de facto are used instead of \"in law\" and \"in practice\", respectively, when one is describing political or legal situations.    [2] => In a legal context, de jure is contrasted to de facto practices, where, for example, the people obey a contract as though there were a law enforcing it, yet there is no such law.    [3] => Ahmad, however, was in practice (de facto) the actual Sultan, and his brother was a figurehead.    [4] => Thus, Egypt was by Ottoman law de jure a province of the Ottoman Empire, but de facto was part of the British Empire.)the 4 element Thus, Egypt was by Ottoman law de jure a province of the Ottoman Empire, but de facto was part of the British Empire.Thus, Egypt was by Ottoman law de jure a province of the Ottoman Empire, but de facto was part of the British Empire.</body></html>

```