isoxiasmoobre
New Member
\[code\]<?phpfunction number_of_fb_comments(){ return $number = "<fb:comments-count href="http://stackoverflow.com/questions/15858954/. get_permalink($post->ID) ." ></fb:comments-count>";}?><?phpfunction get_fb_comments(){ $number = number_of_fb_comments(); if ($number == 1) { echo "<a href =http://stackoverflow.com/questions/15858954/$url#facebook_comments > $number Comment</a></span>"; } else if ($number > 1) { echo "<a href =http://stackoverflow.com/questions/15858954/$url#facebook_comments > $number Comments</a></span>"; } else { echo "<a href=http://stackoverflow.com/questions/15858954/$url#facebook_comments>Leave a comment</a> </span>"; }} ?>\[/code\]I'm trying to make a validation of my facebook comments, but I can't seem to use the '$number' to validate it in the if statement, but I can echo the value and see it.So it will only goes to the 'else' part....I have made $number as a global variable and after using var_dumb($number)I'm seeing series of out put on each of the post\[code\] string(104) "0" string(118) "1" string(111) "0"\[/code\]