Hello, i have this PHP code: this line will cause this command be executed: /usr/sbin/vzctl set 1234 --hostname lkmjfkgkl --save And i need the command to be different: /usr/sbin/vzctl set 1234 --hostname lkmjfkgkl.host.name --save So here i am looking on how to modify above mentioned line of php code. Please how can i join $this->main->hostname with .host.name ? I tried: but do not think it works Please which code to use so i merge above mentioned variable with text ".host.name" so it is merged without any spaces?
If I am understanding correctly, you want to append 'host.name' string on to a variable? If so, you would use a full stop/dot e.g. $this->main->hostname . "host.name" Code (markup): Hope this helps
Like this: lxshell_return("/usr/sbin/vzctl", "set", $this->main->vpsid, "--hostname", $this->main->hostname.".host.name", "--save");
Thank You both. This one also works: lxshell_return("/usr/sbin/vzctl", "set", $this->main->vpsid, "--hostname", "{$this->main->hostname}.host.name", "--save");