Page 1 of 1

[SOLVED] Associative Array in function Compilation error...

Posted: 08 August 2015, 01:23
by Rudolf
Hello,
I don't understand why this part of code doesn't compile...
this associative array is not welcome :) ...

Code: Select all

function gettokenclass(&$tab)
    { 
	var $zclass="token_".$tab['token_type'];	
	if ($tab['token_type']=='SAT') $zclass .="_".$tab['token_color'];
	return $zclass;
    }

Re: Associative Array in function ... Compilation error...

Posted: 08 August 2015, 07:42
by apollo1001
Take out the 'var'.

Re: Associative Array in function ... Compilation error...

Posted: 08 August 2015, 13:59
by Rudolf
Thanks...
didn't know it was now obsolete :)