Skip to content
Advertisement

control file to PHP array

In Linux, .DEB files have ‘control’ text files that are arranged as follows:

JavaScript

What is the best way to get the control file into a PHP array resembling:

JavaScript

keeping in mind that the values can be multi-line and include the “:” separator.

Thanks!

Advertisement

Answer

JavaScript

Implemented as described here: http://www.debian.org/doc/debian-policy/ch-controlfields.html

If I made mistakes corrections are welcomed!

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement