Skip to content

Commit

Permalink
ongoing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mstdokumaci committed May 23, 2012
1 parent 933a28f commit 89d9664
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/readme.md
Expand Up @@ -127,13 +127,13 @@ We can list all users with posts and their likers in a simple loop:

echo '<h2>Posts: </h2>' . "\n";
echo '<ul>' . "\n";
foreach ($user['post'] as $pid) {
foreach ($user['posts'] as $pid) {
//load post of user
$post=$adb->load('post', $pid);
$likers=array();
foreach ($post['liker'] as $liker) {
foreach ($post['likers'] as $lid) {
// load liker of post
$liker=$adb->load('user', $liker);
$liker=$adb->load('user', $lid);
$likers[]=$liker['name'];
}
$likers=(count($likers)) ? '<br />' . implode(', ', $likers) . ' liked.' : '';
Expand Down

0 comments on commit 89d9664

Please sign in to comment.