> Hi all,
>
> It's been too quiet on this list for too long, so here's one to wake
> you all up on a friday afternoon!
>
> I've a number of functions that return arrays to the variable that
> calls them.
>
> The issue I have is that the Array appears to be populated twice - I'm
> printing them out using print_r($array) -
>
>
> Array
> (
> [0] => 16
> [userId] => 16
> [1] => 1
> [userTypeId] => 1
> [2] => [EMAIL PROTECTED]
> [userEmail] => [EMAIL PROTECTED]
> [3] => 709deefcf8174b118939b5cd2c6e2147
> [userPassword] => 709deefcf8174b118939b5cd2c6e2147
> [4] => Matt
> [userFirstName] => Matt
> [5] => Wallace
> [userLastName] => Wallace
> [6] => 1234567890
> [userTelNum] => 1234567890
> [7] => proffalken
> [userNickName] => proffalken
> )
>
> Is there any way to quickly recurse through the array looking only at
> one style of index (either the numerical one or the "named" one, I
> really don't care) so I can just display the information once on the
> screen instead of twice?
It sounds like maybe this has been retrieved from a MySQL database using
mysql_fetch_array()... The default result type for that is MYSQL_BOTH which
returns both associated and numerical indexes
If that is the case try MYSQL_ASSOC or MYSQL_NUM... E.g.:
mysql_fetch_array("SELECT * FROM table", MYSQL_ASSOC);
HTH
Dan
____ The WDVL Discussion List from WDVL.COM ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.