[wp-hackers] When $posts = 1

David House dave at xmouse.ithium.net
Tue Dec 21 16:56:43 UTC 2004


Quoting Robert Deaton <false.hopes at gmail.com>:

> try
> if(count($posts) == '1')) {
> instead, since you're comparing count($posts) being true rather than
> being equal to 1.

As count() returns an integer and not a string, the original method was indeed
better.

Try the original thread [1] for a solution.

[1]:
http://wordpress.org/pipermail/hackers_wordpress.org/2004-November/002938.html

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the hackers mailing list