Re: for() question

From: Date: Tue, 29 Apr 2003 09:19:29 +0000
Subject: Re: for() question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145601@lists.php.net to get a copy of this message
On Tuesday 29 April 2003 17:12, Chris Blake wrote: > Why is this code only returning one value to my <td> ? > directories.txt contains 10 entries. > > ----------------------------------------------------------- > <?php > $dir_list = file("directories.txt"); > $number_of_dirs = count($dir_list); 1) Debug by print_r() and/or var_dump() your variables. 2) For existing arrays it is almost always better to use foreach() rather than for(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* We are Microsoft. What you are experiencing is not a problem; it is an undocumented feature. */

« previous php.general (#145601) next »