First of my Quark/php generated Questions

First of my Quark/php generated Questions

am 28.07.2009 18:05:45 von tmiller

Okay I have to echo onto my reverse pub page this chunk of code that is for
generating the page in Quark, it has to echo as is...but I'm getting
errors--I've tried in brackets, in paraenthesis, double quotes, single
quotes etc:

echo "
@Normal=3D
@.LIST
Bold=3D
@.BODY=3D[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=3D[S".BODY
",".BODY","Normal"]<>
@.GLANCE Hed
100K=3D[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=3D[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-LightConde nsed">
@.LIST
Subtopic=20
label=3D[S"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S.
English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondense d">
@.LIST Body
no indents=3D[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-LightConde nsed">"
;


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: First of my Quark/php generated Questions

am 28.07.2009 18:32:20 von M.Ford

> -----Original Message-----
> From: Miller, Terion [mailto:tmiller@springfi.gannett.com]
> Sent: 28 July 2009 17:06
>=20
> Okay I have to echo onto my reverse pub page this chunk of code that
> is for
> generating the page in Quark, it has to echo as is...but I'm getting
> errors--I've tried in brackets, in paraenthesis, double quotes,
> single
> quotes etc:
>=20
> echo "
> @Normal=3D
> @.LIST
> Bold=3D
> @.BODY=3D[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=3D[S".BODY
> ",".BODY","Normal"]<>
> @.GLANCE Hed
> 100K=3D[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=3D[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-LightConde nsed">
> @.LIST
> Subtopic
> label=3D[S"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U
> .S.
> English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondense d">
> @.LIST Body
> no indents=3D[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-LightConde nsed">"
> ;

The problem here is you have a string to output with lots of double quotes =
embedded in it, and you have also tried to quote it with double quotes. The=
re are several things you could do:

(i) Insert a backslash in front of every double quote; I don't recommend th=
is, as you're bound to miss one and it's very ugly to read.

(ii) Enclose it in single quotes instead; this is good as it prevents nearl=
y all interpolation/escaping, but it has the disadvantage that you then hav=
e to backslash any single quotes.

(iii) Use a Heredoc http://php.net/heredoc; this avoids the need to backsla=
sh internal double quotes, but might be a problem if your text ever contain=
s $ signs as it does variable interpolation.

(iv) If you are on PHP 5.3, use a Nowdoc http://php.net/nowdoc.

Whatever option you choose, you will always have to backslash-escape any ba=
ckslashes; on a quick scan, I can't see any in that text block, but it's be=
st to be aware ;)


Cheers!

Mike
--=20
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,=20
Woodhouse Lane, LEEDS,=A0 LS1 3HE,=A0 United Kingdom=20
Email: m.ford@leedsmet.ac.uk=20
Tel: +44 113 812 4730






To view the terms under which this email is distributed, please go to http:=
//disclaimer.leedsmet.ac.uk/email.htm

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: First of my Quark/php generated Questions (RESOLVED)

am 28.07.2009 18:40:36 von tmiller

On 7/28/09 11:05 AM, "Miller, Terion" wrote:


echo "
@Normal=3D
@.LIST
Bold=3D
@.BODY=3D[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=3D[S".BODY
",".BODY","Normal"]<>
@.GLANCE Hed
100K=3D[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=3D[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-LightConde nsed">
@.LIST
Subtopic
label=3D[S"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S.
English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondense d">
@.LIST Body
no indents=3D[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-LightConde nsed">"
;


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: First of my Quark/php generated Questions (RESOLVED)

am 28.07.2009 18:52:08 von List Manager

Miller, Terion wrote:
>
>
> On 7/28/09 11:05 AM, "Miller, Terion" wrote:
>
>
> echo "
> @Normal=
> @.LIST
> Bold=
> @.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-LightConde nsed">
> @.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-BlackCondense d">
> @.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-LightConde nsed">"
> ;
>
>

It is always nice to have a solution presented to the list for the
archives...

How about posting your solution?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: First of my Quark/php generated Questions (RESOLVED)

am 28.07.2009 18:55:05 von tmiller

Oh sorry, apparently that time it took the boss standing over me telling me=
to try the single quotes again....(pretty sure I had tried them-I may have=
caching problems on my dumb computer) anyways so putting it in single quot=
es not double worked like a charm.


On 7/28/09 11:52 AM, "Jim Lucas" wrote:

Miller, Terion wrote:
>
>
> On 7/28/09 11:05 AM, "Miller, Terion" wrot=
e:
>
>
> echo "
> @Normal=3D
> @.LIST
> Bold=3D
> @.BODY=3D[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=3D[S".BODY
> ",".BODY","Normal"]<>
> @.GLANCE Hed
> 100K=3D[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=3D[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-LightConde nsed">
> @.LIST
> Subtopic
> label=3D[S"",""]<*C*h"Standard"*kn0*kt0*ra0*rb0*d0*p(0,0,0,10,4,2,g,"U.S.
> English")PKs100t-3h100z8.7k0b0cKf"InterstateNL-BlackCondense d">
> @.LIST Body
> no indents=3D[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-LightConde nsed">"
> ;
>
>

It is always nice to have a solution presented to the list for the
archives...

How about posting your solution?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php