Re: [PHP] Strip numerical indices from array [SOLVED]

2007-08-13 Thread Dave M G
Larry, Thank you for responding. ... you want to be using mysql_fetch_assoc() instead... Thank you, that helps me achieve what I need. Or, better yet, use mysqli_ ... if you're running PHP 5 (which you are, right? Yes, I am running PHP 5. However, this mysqli usage is clearly not as simple

Re: [PHP] Strip numerical indices from array [SOLVED]

2007-08-13 Thread Larry Garfield
On Monday 13 August 2007, Dave M G wrote: Larry, Thank you for responding. ... you want to be using mysql_fetch_assoc() instead... Thank you, that helps me achieve what I need. Or, better yet, use mysqli_ ... if you're running PHP 5 (which you are, right? Yes, I am running PHP 5.

[PHP] Strip numerical indices from array

2007-08-12 Thread Dave M G
PHP General list, I've got an associative array that also includes a numerical index. The numerical index was automatically generated from the mysql_fetch_array command, so it the values are the duplicates of the associative key names. Is there a way to simply strip off the numerical index,

Re: [PHP] Strip numerical indices from array

2007-08-12 Thread Larry Garfield
There is, but you want to be using mysql_fetch_assoc() instead which gives you just the keyed indexes in the first place. Or, better yet, use mysqli_ or PDO which offer better security than mysql_ if you're running PHP 5 (which you are, right? g) On Sunday 12 August 2007, Dave M G wrote: PHP