PHP load up a chart + REP
#7

If the previous assignment of $count is a global (which should be avoided) then this:
PHP код:
function GetBannedCount()
{
return 
$count;

does absolutely nothing because that local variable $count is not the same as the global variable $count. To reference a global variable in a method the 'global' keyword is needed. Same with the other function where the local $result is not the same as the global $result.
Reply


Messages In This Thread
Test - by Amit1998 - 23.05.2016, 21:30
Re: PHP load up a chart + REP - by ilijap - 23.05.2016, 21:47
Re: PHP load up a chart + REP - by Amit1998 - 23.05.2016, 21:52
Re: PHP load up a chart + REP - by ilijap - 23.05.2016, 21:58
Re: PHP load up a chart + REP - by Amit1998 - 23.05.2016, 22:27
Re: PHP load up a chart + REP - by ilijap - 24.05.2016, 00:00
Re: PHP load up a chart + REP - by Vince - 24.05.2016, 05:28
Re: PHP load up a chart + REP - by JasperM - 24.05.2016, 08:31
Re: PHP load up a chart + REP - by Amit1998 - 24.05.2016, 09:10
Re: PHP load up a chart + REP - by JasperM - 24.05.2016, 10:08

Forum Jump:


Users browsing this thread: 2 Guest(s)