In my own research, I had come across the in_array function and couldn't figure out to use it since the info was an object???
I tried putting your example in, and couldn't get it working... This seems like the right path though.
I've now got something working, & I intend on tinkering some more with this idea, and see if I can work through it.
I appreciate your input!!
So now using this (and a slight modification) I've finally gotten something working with the desired output.
Here's what I've got, in case anyone else want to see it...
<ul id="reblog">
<? foreach ($xml->posts->post as $post) { ?>
<li>
<?
// REGULAR POSTS
if ($post['type'] == "regular" ){?>
<? // if this is a status post with no title...
if ($post->{'regular-title'} == "") {?>
Regular Post: This is a status update
<? ;} ?>
<? // regular post with check for the "infographic" tag
if(property_exists($post, 'tag')) {
$count = count($post->tag);
$i = 0;
while($i <= $count) {
if(isset($post->tag[$i]) && $post->tag[$i] == 'infographic') {
$bunch[$i] = 'infographic';
$tag = true;
} else {
$bunch[$i] = 'non-infographic';
}
$i++;
}
if($tag) {?>
Regular Post: This is an infographic
<?
$tag = null;}
else {?>
Regular Post
<? ;}
}
?>
<?
}
// PHOTO POSTS
if ($post['type'] == "photo" ){ ?>
Photo Post
<?
}
// LINK POSTS
if ($post['type'] == "link" ){ ?>
Link Post
<?
}
// Quote Posts
if ($post['type'] == "quote" ){ ?>
Quote POST
<?
}
// CHAT POSTS
if ($post['type'] == "conversation" ){ ?>
Chat Post
<?
}
// AUDIO POSTS
if ($post['type'] == "audio" ){ ?>
Audio Post
<?
}
// VIDEO POSTS
if ($post['type'] == "video" ){ ?>
Video Post
<?
}
?>
</li>
<? } ?>
</ul>
/**
<ul>
<li>Video Post</li>
<li>Video Post</li>
<li>Photo Post
<li>Regular Post</li>
<li>Video Post</li>
<li>Link Post</li>
<li>Regular Post: This is an infographic</li>
<li>Video Post</li>
<li>Video Post</li>
<li>Regular Post</li>
<ul>
*/