Well this is confusing.. because echo is simply a command to ouput something into your XHTML document or to the screen. So this should work on both browsers.
Did you make sure that your IE's javascript is enabled? Because once PHP outputs lines like that to the HTML document and your browser reads that line, javascript must be enabled to work.
so to check and see if your IE's javascripting is enabled:
a) goto Tools > Internet Options
b) select Security tab
c) click on Internet icon
d) below this is a 'Security level for this zone' panel...click on the custom level button
e) scroll almost all the way down till you find a section called scripting, and right under it is a subsection called active scripting...ensure that the enabled radio button is checked on if it isn't already.. finally, click 'OK' and any further confirmations that MS throws your way.
Then retry your code in IE.
Cheers,
NRG