0
This syntax is incorrect?
$impostos[$value['prod']['cProd']]['ICMS']['vicms']=reset($value['imposto']['ICMS'])['vICMS'];
my doubt is in relation to the command reset()
can be used this way
Is making a mistake 500 Internal Server Error na my PHP page
And when I open it with Dreamweaver it’s indicating that this line is incorrect
What mistake? What’s going on?
– rray
the
['vICMS']
should be within parentheses, you need to enable the errors, so,ini_set('display_errors', true); error_reporting(E_ALL);
– rray
it’s actually right this way, because I need to get the first item of the array and inside get the
['vICMS']
so if I let him into parentheses it wouldn’t work @rray– Silvio Andorinha
reset($value['imposto']['ICMS']); $impostos .... = $value .... ['vICMS']
resolve? trade the points by long rs– rray
It depends on the version of your PHP, if it is 5.3 below does not accept this:
reset($value['imposto']['ICMS'])['vICMS']
– gabrieloliveira
@gabrieloliveira worse than, the version I’m wearing is the
5.5.9
– Silvio Andorinha
You can put a snippet of the return of this array?
– Marcelo de Andrade
Are you sure the error is there in this line? The ideal is to activate the error display to show more details. In Dreamweaver is configured that version of PHP you are using?
– gabrieloliveira
Problem Solved!
– Silvio Andorinha