i have php script where i write result to file through file_put_content but it not writing for one variable...when i give static value it is working. my code is.
<?php
$uuid = trim(str_replace(' ', '', $dmid));
$establish = "\n\n START -- ".date('Y-m-d h:i:s')." serial-no:".$uuid.",if:".$res_value['if']."\n";
file_put_contents('filter.log', $establish);
?>
when I echo $uuid
it displays 03000200-0400-0500-0006-000700080009
but it write on filter.log
file like START -- 2017-09-26 06:06:24 serial-no:,if:em1
i tried trim function not any help...i don't how to done this please help me.