Answer the question
In order to leave comments, you need to log in
How to fix problem with foreach loops and php array?
Hello. I have this code:
$textareaValue = '[email protected]|aaa/[email protected]|bbb/[email protected]|ggg';
$smth = explode('/n',$textareaValue);
foreach ($smth as $aa => $bb) {
list($emails, $passwords) = explode('|', $bb);
foreach ($emails as $a1 => $b1) {
echo $b1.':';
}
foreach ($passwords as $a2 => $b2) {
echo $b2.'<br>';
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question