1

Possible Duplicate:
In PHP, is there a function that returns an array made up of the value of a key from an array of associative arrays?

Several values stored in one single row in an array like this:

Array
(
  [data] =>
     Duration: 1 Month
     Name: James Foo
     Category: Info Tech
)

Question:

How could I extract and echo the values from [data] separately? i.e. display only Category: Info Tech?

Community
  • 1
  • 1
xchampionx
  • 106
  • 1
  • 11
  • the category etc should be in another array index – kennypu Dec 29 '12 at 01:23
  • If all above is a value of element at index `data`, then how rows fo data are separated? Is there a space between them like `Duration: 1 Month Name: James Foo Category: Info Tech` or is there a new line after each like `Duration: 1 Month\nName: James Foo\nCategory: Info Tech`. After getting this info you will receive an answer. – Eugene Dec 29 '12 at 01:49
  • Values are separated with
  • . @Cryptic already provided me the answer I was looking for but I don't mind you showing me your solution as well. I'd love to study the code for the sake of information and future reference.
  • – xchampionx Dec 29 '12 at 03:57