Link to home
Start Free TrialLog in
Avatar of Eduardo Fuerte
Eduardo FuerteFlag for Brazil

asked on

Could you point a possible reason a PHP variable is not accepted by an array element?

Hi Experts

Could you point a possible reason a PHP variable is not accepted by an array element?

Accordingly to:

print_r('-------------');
print_r($xxx);  // Has the correct value 
print_r('-------------');

$obj3->professionals = array(
			array('name'=>$xxx,
				  'nickname'=>'',
				  'roles'=>array($papel),
				  //'role'=>array('plantonista'),
				  'internal_id'=>"CONS:".$conselho.'-'.$identificador_interno,
				  'cellphone'=>$reg5['celular_profissional'],
				  'tags'=>array("COOP:".$reg3['cooperativa'],
				  "FUNC:".$reg5['tipo_profissional'],
				  "TIPO_PAGAMENTO:".$tipo_pagamento,
				  "VALOR:R$".$reg5['valor_prof']),
				  "gender"=>$reg5['sexo_profissional'], 
				  "send_invite_when_submit"=>true,
				  'shifts' => $shifts)
			  );						 

Open in new window


Amazingly $xxx has the correct value but it's not correctly accepted by the array element, another value enters in.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America 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 Eduardo Fuerte

ASKER

Really, something apparently absurd.
I'm out of office now.
Tomorrow I will post all the context.
Sorry, gr8gonzo

It really doesn't make any sense.
That was a side effect from another problem.

I'm going to open another question about.

Thank you for your attention.
Could have a look on that another question ?

Another question, related to this question.