How do I get the value of an associative array using its key. For example, I have:
$new = array(
array(
"post" => "anything",
"newt" => "Nothing"
),
array(
"post" => "something",
"newt" => "Filthy"
),
array(
"post" => "one value",
"newt" => "normal"
),
array(
"post" => "two value",
"newt" => "happy"
),
array(
"post" => "Three",
"newt" => "more"
)
);
Now I want to get the value of post
. That means I want to get echoed anything, something
. How do I accomplish this? I tried a way but that's not working. Example;
print_r($new['post']);
I also tried echo $new['post'];
but doesn't work. Please help