Having problem using a code in CFV6

Ron 10 Feb, 2019
Hello
I have to get a full detail from a dynamic array to be displayed in an email but I am not able to do it. I have no problem working in CFV5 but it CFV6 it does not work.
<?php
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_xyz' . DS . 'country_full_name.php' );
echo( "\n {$country_full_name[$this->data['country_name'].''.'']}" );
?>
I get the name of country in two digits from a form field. For example AU. So as per this I get from a dynamic array the full name of the country that is Australia. in CSV5. I tried to do this in CFV6 by using a custom code but I just cannot get it to work.

Could I get some help as to how could I accomplish this.

Thanks

Ron
healyhatman 11 Feb, 2019
Answer
I thought we covered this buddy?
$this->data("fieldname");

Round brackets mate. It's a function, not an array.
Ron 11 Feb, 2019
Thanks for the response . I am going to try out.
Ron 11 Feb, 2019
Thanks healyhatman,

Sorry I had not noticed the round brackets earlier. It worked

Thanks again

Ron
Ron 11 Feb, 2019
Hello healyhatman,

I made the changes but the round brackets dose not seem to work. I get an empty response ( blank ).

Thanks for all the help.

Ron
healyhatman 11 Feb, 2019
Where is $country_full_name coming from and is this in a custom code block or a PHP block
Ron 11 Feb, 2019
It comes from the array that has the full names . It is a custom code block
country_full_name.php
This topic is locked and no more replies can be posted.