Link to home
Start Free TrialLog in
Avatar of somits
somits

asked on

PHP fucntions with parameters

Hi:

I got some problems with PHP functions

I'd like to declare a PHP function, using Zend Studio 6

function testfunc ()

{

}


function testfunc ($aVar)
{

}

The first function, testfunc(), without parameter is OK
The 2nd function, testfunc($aVar), has syntax error.

I could not figure out why because it seems trivial to have such parameter.

Maybe I made some error.

If you've some idea, please help.

Thanks

Somits
ASKER CERTIFIED SOLUTION
Avatar of cmorbach
cmorbach
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of somits
somits

ASKER

Hi cmorbach:

Thanks for the reply.

Actually, I didn't overload the function.

I only have 1 function in the php file: testfunc.

However, if this function does not have any parameter. it's OK.
If I added a parameter into it, it has syntax error.

Somits
Is it Zend Studio thats reporting it? or have you tried calling in in a browser?

I have not used Zend Studio for a while ( I prefere Eclipse ).