Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Tuesday, February 14, 2012
Multiple variables access through foreach in php
foreach ($courses as $course, $sections as $section, $example as $example)
any ways to add more than 2?
i only know the solution to 2 variables.
foreach (array_combine($courses, $sections) as $course => $section)
if all array has same keys then
ReplyDeleteforeach ($courses as $key => $course)
{
echo $sections[$key];
echo $example[key];
}