1

I am new to PHP and am facing the below issue. There are two files:

In the first PHP file I am writing the below code to create an object

$oNotas = new gcibjdnf($sFiltro, false,'apcconc.nm_apelido', $bBuscarPorChassi);

In the second file-gcibjdnf.php, I have the below code for the constructor

public function __construct($sFiltro = '', $bPaginar = false, $sOrdem= 'apcconc.nm_apelido, danfe', $bBuscarPorChassi = false) {

...}

However, when I print $sOrdem from the gcibjdnf.php file, I am getting "apcconc.nm_apelido, danfe" as an output.

According to me it should print "apcconc.nm_apelido". But it is printing the default parameter instead of the value passed.

I am using PHP 5.6 version. Please let me know in case anyone has any idea on this.

ficuscr
  • 6,975
  • 2
  • 32
  • 52

0 Answers0