I read a string from config.ini the string is
config.ini
[section]
param = "#1234\y"
then when I read this code and print it in logs or try to send it to the server or socket this will print the following:
#1234\\y
How can I make sure I will send only one backslash
also when I get from config without \y . and try to concatenate that via php like $x.'\y' it is the same and not working.
it's working only if I define a variable with the string and not from the config
my udp server I need to send the string
//Send the message to the server
if( ! socket_sendto($sock, $newstr , strlen($newstr) , 0 , $ip , $port))
{
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
throw new Exception("Could not send data: $errorcode $errormsg \n");
}