Jump to content

[SOLVED] Echoing large chunks of html


CodeMama

Recommended Posts

I have this large chunk of code (it's generated for Quark) to echo out and am having problems it has to be spit out exactly like it is:

 

    echo "<v6.52><e0>
@Normal=<Ps100t-2h100z9.4k0b0cMf"Helvetica">
@.LIST Bold=<Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.BODY=[s"",".BODY"]<*J*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,7,0,10,0,0,G,"U.S. English")Ps100t-2h100z9.4k0b0cKf"PoynterOSTextTwoNL-Roman">
@Normal=[s".BODY",".BODY","Normal"]<>
@.GLANCE Hed 100K=[s"",""]<*L*h"Headline"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,10,0,g,"U.S. English")Ps100t-4h100z16k0b0cKf"InterstateNL-BlackCondensed">
@.GLANCE Text normal=[s"",".GLANCE Text normal"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,5.25,0,10,0,0,G,"U.S. English")Ps100t-2h110.001z9.4k0b0cKf"InterstateNL-LightCondensed">
@.LIST Subtopic label=[s"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S. English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.LIST Body no indents=[s"",".LIST Body no indents"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,0,3,g,"U.S. English")Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-LightCondensed">"
;

Link to comment
https://forums.phpfreaks.com/topic/167811-solved-echoing-large-chunks-of-html/
Share on other sites

It's not working because of the double quotes you have sprinkled around in there, either echo it with single quotes:

echo '<v6.52><e0>
@Normal=<Ps100t-2h100z9.4k0b0cMf"Helvetica">
@.LIST Bold=<Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.BODY=[s"",".BODY"]<*J*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,7,0,10,0,0,G,"U.S. English")Ps100t-2h100z9.4k0b0cKf"PoynterOSTextTwoNL-Roman">
@Normal=[s".BODY",".BODY","Normal"]<>
@.GLANCE Hed 100K=[s"",""]<*L*h"Headline"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,10,0,g,"U.S. English")Ps100t-4h100z16k0b0cKf"InterstateNL-BlackCondensed">
@.GLANCE Text normal=[s"",".GLANCE Text normal"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,5.25,0,10,0,0,G,"U.S. English")Ps100t-2h110.001z9.4k0b0cKf"InterstateNL-LightCondensed">
@.LIST Subtopic label=[s"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S. English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.LIST Body no indents=[s"",".LIST Body no indents"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,0,3,g,"U.S. English")Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-LightCondensed">'
;

 

Or use the HEREDOC syntax:

echo <<<FOO
<v6.52><e0>
@Normal=<Ps100t-2h100z9.4k0b0cMf"Helvetica">
@.LIST Bold=<Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.BODY=[s"",".BODY"]<*J*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,7,0,10,0,0,G,"U.S. English")Ps100t-2h100z9.4k0b0cKf"PoynterOSTextTwoNL-Roman">
@Normal=[s".BODY",".BODY","Normal"]<>
@.GLANCE Hed 100K=[s"",""]<*L*h"Headline"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,10,0,g,"U.S. English")Ps100t-4h100z16k0b0cKf"InterstateNL-BlackCondensed">
@.GLANCE Text normal=[s"",".GLANCE Text normal"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,5.25,0,10,0,0,G,"U.S. English")Ps100t-2h110.001z9.4k0b0cKf"InterstateNL-LightCondensed">
@.LIST Subtopic label=[s"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S. English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondensed">
@.LIST Body no indents=[s"",".LIST Body no indents"]<*L*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,+0,0,3,g,"U.S. English")Ps100t-4h110.001z8.7k0b0cKf"InterstateNL-LightCondensed">
FOO;

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.