Below image show my code.
$usernam = sudo grep -w "navneet" "/var/www/mcloud/modules/demo_cmp/.cmpinfo.txt" | cut -d ":" -f7
;
function check()
{
var username = "<?php echo $usernam; ?>";
alert(usernam);
return false;
}
I am retrieving value of $usernam variable by linux command and I want to use this variable value in javascript. But unfortunately javascript stop working after adding value of php variable. Please help me to short out my problem.