Jump to content

Php String Encoding help


sazzie

Recommended Posts


I have a problem setting up what is supposed to be a simple string. The code is as follows:

[code]
echo "<br> before declaration : ".$javascript;
$javascript = "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"CalendarPopup.js\" type=\"text/javascript\"></SCRIPT>
<SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\">
var cal = new CalendarPopup();
</SCRIPT>";
# $test = "test string";
echo "<br> after declaration : ".$javascript;
[/code]

The problem is the $javascript object still contains nothing when execution reaches the second echo call.
If I uncommented the $test object and attempt to echo it, that will display fine.

Can you advice me on what the issue and solution is please?
Link to comment
https://forums.phpfreaks.com/topic/34706-php-string-encoding-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.