Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Array: keys and values
Name: joba Date: May 3, 2007 at 06:44:54 Pacific OS: Win Vista Premium CPU/Ram: Intel centrino, 2gb ram Product: HP
Comment:
If an array looks like this: $answers = array( 'gender', 'age', 'income', 'home', 'time_online', 'it_knowhow', 'online_buys')
nope, in the above array, the keys will be: 0, 1, 2, 3, 4, 5, 6
--- Fubar
0
Response Number 2
Name: wizard-ict Date: May 13, 2007 at 09:44:33 Pacific
Reply:
An array key can never be NULL, otherwise it would completely defeat the point of having an array. If you don't define the key (as in your example above), it will automatically be created starting at 0. Giving you the keys as stated by Laler
Summary: I'm not sure if it's what you're after, but you can use print_r($array) to output the keys and values of an associative array. In your first post, $result3 = mysql_query("SELECT * FROM VTABLE;") or...
Summary: Dunno if it will be of use, but I modified an ajax script I use at times for posting data to send the date every couple of seconds. Below are the two files - the html page and php page respectively. ...
Summary: First, you shuld always specify what language you are using - it could have been confused for Javascript. Second you need to give an example of the array values. In your example you are testing to see...