Re: go through array

From: Date: Tue, 17 Jun 2003 16:57:00 +0000
Subject: Re: go through array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151862@lists.php.net to get a copy of this message
Hello, This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 17:43, lines prefixed by '>' were originally written by you. > I have this array: > Array ( [2] => 6 [1] => 2 [3] => 2 ) > how do I go through it and get the key and the value in this order? Use the foreach construct, it is documented at: http://uk2.php.net/foreach David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP)

« previous php.general (#151862) next »