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
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;

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.