Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJerry Schrader
4,396 PointsThis is probably something very simple, but for some reason, I get a server error with my code.
$names = array( 'Mike' => 'Web Developer', 'Scott' => 'Student', 'Steven' => 'Student' );
function print_info($value, $key){ echo "$key is a $value"; }
array_walk($names, 'print_info')
1 Answer
Placid Rodrigues
12,630 PointsHi Jerry,
You need to insert a semicolon after your last line of code. Like this:
array_walk($names, 'print_info');
Then it will work just fine.
Hope that helps.
Jerry Schrader
4,396 PointsJerry Schrader
4,396 PointsThanks Placid,
it was early, lol.