![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2004
Location: in da VIP
Posts: 969
|
PHP gurus, help pls
echo array_count_values($r);
echoes the string "Array" instead the count of the array items ![]()
__________________
I sale fu-fme, hit me up for a killer deal! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
Need to see rest of code. what is $r consisting of. How are you using it in above commands? etc.
__________________
The Best Affiliate Software, Ever. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
echo count($r);
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
|
If you simply want to print out the number of items in an array, use count($r);
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
Quote:
__________________
The Best Affiliate Software, Ever. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Chafed.
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
|
If its just saying "Array" with a capital A, then array_count_values($r); is a function that is returning an array as a value, not a number or a string. Therefore ECHO doesn't know what to do with it.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jul 2004
Location: in da VIP
Posts: 969
|
Cheers guys count did the job
__________________
I sale fu-fme, hit me up for a killer deal! |
![]() |
![]() ![]() ![]() ![]() ![]() |