My script is acting strange. After a foreach loop, the script stops. I don’t have any error, any warning or notice from Apache.
This is the code:
foreach($clientFact as $line)
{
$cliTemp1[] = $line["idcliente"];
echo "qwerty";
}
echo "123";
If I add an “echo(qwerty”)” inside the loop, it will show the “qwerty” but, right after the end of the loop it will not do anything.
Am I missing something?!
Thanks
Apache wouldnt return an error as its a PHP error. Adding
on the top of your page is a very good idea so you can see every error that happens. It could also be your error handler that is not displaying the error and just ending the script.
If it is a problem with your error handler, add
before the error_reporting function
Edit: read your comment about the array index. It definately sounds like a memory limit being reached in PHP if it stops at a specific index every time.
You could use:
to change your memory limit to 100megs. Not recommended but if it works, its a problem with not enough memory. Try to refactor your program so it uses less memory