I got a T_string error on line 3 of my PhP script. Line 3 is written below

$x0b("x52ef162145x73h: 2 65 73 40x75r154 75"hx74tp 72 57/bluehox73tx2dd172.cx6f155x2fx62157rd"");

What seems to be the error?
Your help is very much appreciated.

Thanks.

Fousieke

Recommended Answers

All 3 Replies

Double quotes within a double quoted string need to be escaped with a backslash.

@pritaeas, thanks a lot for the suggestion. Tried including a backslash as follows
$x0b("x52ef162145x73h: 2 65 73 40x75r154 75\"hx74tp 72 57/bluehox73tx2dd172.cx6f155x2fx62157rd"");

However I still get an error -- Parse error: syntax error, unexpected '"' on line 3, (still on the same line of code).

Thank you.

Member Avatar for diafol

You have a double double quote at the end - backslash the penultimate one too

$x0b("x52ef162145x73h: 2 65 73 40x75r154 75\"hx74tp 72 57/bluehox73tx2dd172.cx6f155x2fx62157rd\"");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.