r/PHPhelp • u/crispilly • Jun 28 '22
Solved "foreach" in PHP 8
Hi all,
today i wanted to change the PHP version, because joomla told me that version 7.4 is no longer supported. So i changed to PHP 8. Joomla is still running fine.
Unfortunately my hoster does not support different versions for different subdomains. So, another small script that i need, does not run anymore with PHP 8.
Error 500.
I walked through the code line for line and found that the script stops at this lines:$zusatzfelder = "";
foreach($preset[zusatzfeld] as $key => $value){
$zusatzfelder .= "<input type='text' value='" .$value ."' name='zusatzfeld[" .$key ."]'>";
}
Any ideas why this will not work anymore?
Thanks Tom
7
Upvotes
0
u/[deleted] Jun 28 '22
[deleted]