I’ve created a .info file similar to how you would in drupal.
#Comment
Template Name = Valley
styles[] = styles/styles.css, styles/media.css
scripts[] = js/script.js
I want to use PHP get each variable and their values. For example I’d like to put the Template Name value to a PHP variable called Template Name and put the styles[] values in an array if there is mroe than one.
I’d also need to avoid it picking up on comments that are defined be a hash # before the text.
It seems a lot to ask, bt I’m really not sure how to go about doing this. If someone has a solution I’d be very greatful, however if someone could just point me in the right direction that’ll be just as helpful.
Thanks in advanced!
If you can adkust your info file slightly, you can use a built-in PHP function:
http://php.net/manual/en/function.parse-ini-file.php
which will result in an array