Ok, I have to do an assignment for cass. The teacher wants us to use a FOR loop to print out only first three variables stored in an array called $birds. How do I use a FOR loop to print out only those first three? And furthermore, how would I use it to print out a specific value in the array that is not in sequence with the rest?
Dante2 6 Light Poster
Recommended Answers
Jump to PostOk, I have to do an assignment for cass. The teacher wants us to use a FOR loop to print out only first three variables stored in an array called $birds. How do I use a FOR loop to print out only those first three? And furthermore, how would I …
Jump to Post<?php $birdies = array('birdie1', 'birdie2', 'birdie3', 'berdie4', 'berdie5', 'berdie6', 'berdie7'); for ($i = 0; $i < 3; $i++) { echo $birdies[$i] . "<br />"; }
What do you mean?
nevvermind,
don't do assignment for them,
it goes against very purpose of DW, that is to help people and …
Jump to PostHere here Ev. I hate it when people do the work for some lazy-a*. No wonder we get so many fly-by and gimme-gimme posters. I used to enjoy posting here, now it's turned into Kindergarten. Grumble, grumble...
Jump to PostHere here Ev. I hate it when people do the work for some lazy-a*. No wonder we get so many fly-by and gimme-gimme posters. I used to enjoy posting here, now it's turned into Kindergarten. Grumble, grumble...
That turns many off, and yes I cannot see a lot of PHP …
All 13 Replies

nevvermind
Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

diafol

nevvermind
Stefano Mtangoo 455 Senior Poster
Dante2 6 Light Poster
Stefano Mtangoo 455 Senior Poster
Dante2 6 Light Poster
Stefano Mtangoo 455 Senior Poster

diafol
Stefano Mtangoo 455 Senior Poster

nevvermind
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.