Drviging me NUUUUTS
edit: FIXED!
Also: For some reason, print_f(array) left the underscores between the two words in the two-word keys out, while print_r(array) showed them, so they're actually post_author, post_date, etc. GAH TWO HOURS OF MY LIFE WASTED
=====================================================
SO. I'm using PHP.
I have a multi-dimensional associative array named $most_recent_posts that looks much like this:
SO
echo $most_recent_posts[0]["ID"]; SHOULD print out "4", should it not? Because right now all it's doing is halting the entire damn script.
Also: For some reason, print_f(array) left the underscores between the two words in the two-word keys out, while print_r(array) showed them, so they're actually post_author, post_date, etc. GAH TWO HOURS OF MY LIFE WASTED
=====================================================
SO. I'm using PHP.
I have a multi-dimensional associative array named $most_recent_posts that looks much like this:
Array ( [0] => stdClass Object ( [ID] => 4 [post author] => 3 [post date] => 2010-06-11 19:37:46 ) [1] => stdClass Object ( [ID] => 5 [post author] => 12 [post date] => 2010-06-08 12:34:56 ) )
SO
echo $most_recent_posts[0]["ID"]; SHOULD print out "4", should it not? Because right now all it's doing is halting the entire damn script.
no subject
echo $most_recent_posts[0]->ID;
no subject
unlike EVERY SINGLE EXAMPLE I COULD FIND ONLINE.ALthough I'm now trying to figure out what to do with the two-word keys, because post author, "post author," 'post author,' [post author], and (post author) don't seem to work.
edit: FIXED. For some reason, print_f(array) left the underscores between the two words in the two-word keys out, while print_r(array) showed them, so they're actually post_author, post_date, etc. GAH TWO HOURS OF MY LIFE WASTED
no subject
http://www.databasejournal.com/features/php/article.php/10898_1485971_3/PHP-and-Working-with-Databases-for-the-Lazy-Sod.htm
Maybe there's other goodies at that site that can help you with your particular chosen data structures.