Hi Guys,
I am trying to display one value in an array and keep on getting a null value. Kindly could someone help me with this.
This is the array in $this->userfields (invoice_items template VM3)
["volume2"]=>
array(8) {
["name"]=>
string(7) "volume2"
["value"]=>
string(6) "0.08m3"
["title"]=>
string(16) "Packaging Volume"
["type"]=>
string(4) "text"
["required"]=>
string(1) "0"
["hidden"]=>
bool(false)
["formcode"]=>
string(102) " "
["description"]=>
string(0) ""
}
I want to display the volume2 value on my invoice: I have tried
$this->userfields['volume2'] but this gives me a null result as well as $this->userfields['volume2']['value']
Regards,
MediaX
r u sure volume2 is an array?
try $this->userfields->volume2['value']
use print 'Debug Line '.__LINE__.' $this->userfields <pre>'; print_r ($this->userfields); print "</pre><br />\n";
to dump -- easier to see what it is
Hi GJC,
Thanks for assistance ... $this->userfields->volume2['value'] does not give me any value. After looking at the output from the debug line you suggested I found that:
echo $this->userfields['fields']['volume2']['value'];
gave me the value I was looking for.
Thanks man,
MediaX