Read Sections of the File in PHP for Creating Labels
<p>I have a file which extract data from MYSQL database to create labels. I have add a string "BREAK" where labels end. My data file looks like this.</p>

<pre>
--------- Start File -------

BREAK
Order: 10000
NAME: XYZ
Phone: XXX-XXX-XXX

6 x ABC
6 x Main ST
6 x CITY
6 x STATE
6 x COUNTRY

BREAK
Order: 10001
NAME: XYZ1
Phone: XXX-XXX-XXX

BMC
MJ ST
CITY
STATE
COUNTRY

BREAK
Order: 10002
NAME: XYZ2
Phone: XXX-XXX-XXX

BMC
MJ ST
CITY
STATE
COUNTRY

......more orders..

--------- End File -------
</pre>

<p>In addition to reading 3  or more blocks and printing them separate, for the first block which is  "6 x", I would like to remove "6 x" from the block and instead store 6 as a value in a variable to be used with lpr/print command on unix for printing 6 copies. This is not a major issue, I can probably figure it out later but reading these blocks in php and creating 3 or more files from them is my requirement.</p>
