Jump to content

Creating CSS file for group of PHP files


amites

Recommended Posts

Hello,

 

I'm rather new to writing Regex and have a simple request,

 

what I have is a collection of scripts that I wrote rather quickly, now the scripts work and place things inside of different div boxes and other class and id definitions,

 

however I Haven't created a css file to format everything and I'd like to create a function to parse a folder searching for all class names matching

 

class="[class name]"

 

and id names matching

 

id="[id name]"

 

then run that group through a foreach loop to write to a css file

 

.[class name] {

}

 

#[id name] {

}

 

I can handle the opening the directory, and parsing the array once it's been built from preg_match_all though building the regex query itself is giving me some trouble, probably has to do with the 15 hour day I've pulled so far *heh*

 

any help is appreciated

Link to comment
https://forums.phpfreaks.com/topic/93050-creating-css-file-for-group-of-php-files/
Share on other sites

I was planning on building this into a php function and running it on my computer,

 

if it works probably release it open source, seems like a simple way to save some time when building larger projects,

 

not have to deal with tracking CSS classes and ID's just using good labels

 

I'll see how that works

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.