Printing specific items in an array

Uwelrtvixhjgg

New Member
I'm a newbie and trying to do this for my college class.I have created an array called birds:Here is my code:\[code\]<?php // This script creates an array called birds and then prints out the birds 1-3 and then prints the birds 0,, 2 and 4$birds = array ("Whip-poor-will|Chickadee|Pileated Woodpecker|Blue Jay|Rufus-sided Towhee|Scarlet Tanager");\[/code\]I need to print out specific items within the array using foreach.would the next code be \[code\]Foreach($birds as $key =>value){print "$key $1,2,3 <br>";}\[/code\]
 
Back
Top