I want to add new line to an existing string I tried this way
$filename = 'popups-'.$jsonData['name'].'.js';
$text = $jsonData['text'].'\n';
However I get \n
directly append in the string instead of a new line
What am I doing wrong here??
I want to add new line to an existing string I tried this way
$filename = 'popups-'.$jsonData['name'].'.js';
$text = $jsonData['text'].'\n';
However I get \n
directly append in the string instead of a new line
What am I doing wrong here??
you should use double quotes for this
$filename = 'popups-'.$jsonData['name'].'.js';
$text = $jsonData['text']."\n";