Some additional info to my question.
I create an array with data necesery to connect to wifi and mqtt server.
The data are : filed(0) = ssid, field(1) = wifi password, field(2) = mqttserver ..... port, user, pasword, topic ...
Everything is working but sending data not working when the topic is used from field array.
fields(7) is defined as string
fields(7) = "mytopic"
mqtt.publish ( fields( 7 ), mydata ) > it doesnt works
mqtt.publish("mytopic",mydata) > it works.
Thank You
Andrej