How to assign this to variable

I need some help,I am trying to convert the first package of image to put inside into double quotes like this
" "; in order that I can assign it into variable ($packimg1=“hexcode_here”);.but my editor will produce errors.

Thank you in advance.

FF D8 FF DB 00 84 00 13 
0E 10 0E 0C 13 10 0F 10 13 /9)+"/D<GFC<B@KTl[KPfQ@B^80 _fosyzyIZ84 8E 83 u8D lvyt01 77tMBMttttttttttttttttttttttttttttttttttttttttttttttttttFF C0 00 11 08 01 E0 02 80 03 01 !00 02 11 01 03 11 01 FF DD 00 04 00 (FF C4 01 A2 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 
0B 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 01 }01 02 03 00 04 11 05 12 !1A06 13 Qa07 "q281 91 A1 08 #BB1 C1 RD1 F0 $3br82 09 
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E1 E2 E3 E4 E5 E6 E7 E8 E9 EA F1 F2 F3 F4 F5 F6 F7 F8 F9 FA 01 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 
0B 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 w00 01 02 03 11 04 05 !106 12 AQ07 aq13 "281 08 B91 A1 B1 C1 09 #3RF0 brD1 
$4E1 %F1 &'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz82 83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E2 E3 E4 E5 E6 E7 E8 E9 EA F2 F3 F4 F5 F6 F7 F8 F9 FA FF DA 00 0C 03 01 00 02 11 03 11 00 ?00 A8 193 93 E8 qN9E 0i00 0C 90 0F jp03 <FE B4 00 B8 E7 AD (FC :00 u(*b03 F5 CF E1 N86 801 C7 A1 OA5 1
06 07 OC0 R85 ?Oj06 .09E9 J06 h01 qF0F a9A 00 \Q8A 00 6D1 8F z04 &05 6H83 A6 1F3 0E 86 81 95 D7 E5 !B9 E3 B5 Z004 
00 !Zi00 D2 )85 h01 84 SHA0 06 11 M"80 E08E sH06 9A i00 86 9B @08 HC2 C4 D0 02 cD2 9C 00 B4 94 00 94 P01 E00 P01 E00 -I0C F3 ZCF C5 BB ED 92 6DC =0F A8 >C6 80 :EB F5 87 WD2 bBF 83 kBB B8 E7 EA ?03 \A5 mF6 k9D CA 19C 8F AD 0*D1 @05 %0
J00 (A4 01 E00 %C0 (A4 02 f8C D0 02 f8A 00 (F4 04 FD (01 EB AD D2 3RAD 94 C7 AE D1 F5 401 FF D0 AA x07 iE9 ED K8C E4 R@8rs9A \0C P03 80 <8C D2 8C F0 
8F CE 98 
07 A0 E3 BF 4E0 A3 D3 8F J00 pC9 EA sK8F zB9E sK80 =i8C P?FD dD1 C7 q9F Nh01 E0 C7 F4 A3 C6 (10 A0 RED E6 81 86 DF R>94 b81 0B B7 F0 A3 07 EA (m8E6 93 oA8 A0 D711 E1 B7 8E 87 AF B5 $$82 T9E 0F J06 LWDA 9A G00 C2 )A4 P03 08 A6 11 @0C "98 E G4D2 (01 84 SM00 4D4 eBD (01 *C3

What editor are you using?

Buddy

Wait, so you’re attempting to assign the above code to a variable in PHP?

You could either save it into a file by itself, and then assign the return value from file_get_contents(), or you could use a nowdoc (PHP 5.3 <=):

$hexCode = file_get_contents('hex_code_file.txt');

//nowdoc
$hexCode1 = <<<'hexcode'
paste the hex code here
hexcode;

The reason why I suggested a nowdoc over a heredoc is because you have the \0 character sequence in your hex code, which would be interpreted by the PHP engine (by back referencing it to an ASCII character in the octal numbering system to the NUL char). This would cause it to be omitted.

@tpunt, Thank you for the reply,Okay I will try this solution…