brown2005 Posted December 7, 2007 Share Posted December 7, 2007 is this below code ok... as its not working so i presume its not function Count($type,$topic) { } Link to comment https://forums.phpfreaks.com/topic/80625-function-with-two-varibles/ Share on other sites More sharing options...
phpknight Posted December 7, 2007 Share Posted December 7, 2007 Can you be more specific? BTW, it is never a good idea to name a function something like count which might be used by the system. Check all your braces, semicolons, etc. Link to comment https://forums.phpfreaks.com/topic/80625-function-with-two-varibles/#findComment-408847 Share on other sites More sharing options...
PHP_PhREEEk Posted December 7, 2007 Share Posted December 7, 2007 <?php function Count($type, $topic) { // do something } is invalid, as phpknight pointed out, count() is already a php built-in function. <?php function thisCount($type, $topic) { // do something } would be perfectly valid. Be aware you are forcing those two arguments to be sent with the request to the function. PhREEEk Link to comment https://forums.phpfreaks.com/topic/80625-function-with-two-varibles/#findComment-408863 Share on other sites More sharing options...
brown2005 Posted December 7, 2007 Author Share Posted December 7, 2007 o yeah.. omg.. why didnt i spot that.. now i feel stupid. thanks mate Link to comment https://forums.phpfreaks.com/topic/80625-function-with-two-varibles/#findComment-408868 Share on other sites More sharing options...
PFMaBiSmAd Posted December 7, 2007 Share Posted December 7, 2007 Checking your web server log for errors and/or turning on full php error reporting in php.ini or a .htaccess file would have exposed the function naming problem. Link to comment https://forums.phpfreaks.com/topic/80625-function-with-two-varibles/#findComment-408904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.