GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP gurus, help pls (https://gfy.com/showthread.php?t=551167)

spacemonk 12-12-2005 12:45 PM

PHP gurus, help pls
 
echo array_count_values($r);

echoes the string "Array" instead the count of the array items :helpme

Nookster 12-12-2005 12:46 PM

Need to see rest of code. what is $r consisting of. How are you using it in above commands? etc.

Alky 12-12-2005 12:46 PM

echo count($r);

paterson3713 12-12-2005 12:47 PM

If you simply want to print out the number of items in an array, use count($r);

Nookster 12-12-2005 12:48 PM

Quote:

Originally Posted by Alky
echo count($r);

Ya, what he/she said.

gornyhuy 12-12-2005 12:48 PM

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.

spacemonk 12-12-2005 12:52 PM

Cheers guys count did the job


All times are GMT -7. The time now is 09:35 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123