I try to echo a value from a multidimensional array but somehow I can't figure it out.
The structure of this array is as followed:
todos
- remaining
- id
- todolist_id
- position
- content
- completed
- created_at
- updated_at
- comments_count
- due_on
- due_at
- creator (array with: id, name, avatar url)
- assignee (array with: id, type, name)
- completed
My problem at the moment is, I am unable to echo/print the values from the due_at and due_on (which are the only 2 I need). As I figured out this is most likely caused by the 2 arrays (creator, assignee) at the end. Since every time I try to view the values it stops before the creator part and does not show the other todos, just the first one. here is the piece of code I used to echo the values:
foreach($todo_itemphp->todos as $key => $value) {
echo "<ul>";
echo "<li>".$key. ":". " ". "</li>";
foreach ($value as $key2 => $value2) {
echo "<ul>";
echo "<li>".$key2. ":". " ". "</li>";
foreach ($value2 as $key3 => $value3) {
echo "<ul>";
echo "<li>".$key3. ":". " ". $value3."</li>";
foreach ($value3 as $key4 => $value4) {
echo "<ul>";
echo "<li>".$key4. ":". " ". $value4."</li>";
echo "</ul>";
}
echo "</ul>";
}
echo "</ul>";
}
echo "</ul>";
}
If you would like to know it's concerning Basecamp, I'm trying to get all the relevant project info to be view on screen. If there are any questions or if I was a little bit vague with my question please ask me to clarify, I hope I gave enough information for you guys to see if I'm doing it right. And if not what I'm doing wrong.