![]() |
|
#1
|
|||
|
|||
generating arrays from main multi-dimensional arrayHi!
For a list of projects, I have no access to a database, so I decided to create a folder for each project. The names of these folders are meant to categorize the projects by client and media: PHP Code:
I asked on another forum how I could create individual arrays out of this one using the dash delimiter from the strings. i was given the following: PHP Code:
But how do I use this to generate arrays for the media and clients? I.E.: PHP Code:
What I would then like to do is generate sub-arrays of related projects per media or client. I.E.: PHP Code:
Last edited by LuciWiz : 08-Jul-2005 at 08:38.
Reason: Please insert your Php code between [php] & [/php] tags
|
|
#2
|
|||
|
|||
|
You could use a regular expression match (preg_match() would be a possible function) and create a media array and a client array by looping through the original array and returning all of the matches.
If you are not familiar with regular expressions, then here is a good website that helped to get me started: weblogtoolscollection.com Hope this helps. Last edited by admin : 26-Jul-2005 at 01:28.
Reason: Please set up signature in your profile only.
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic allocation of multi dimensional array | pointer | C Programming Language | 7 | 13-May-2005 23:50 |
| Noob question on c arrays and functions | brett | C Programming Language | 1 | 20-Apr-2005 03:59 |
| template comiling problems - need expert debugger! | crq | CPP / C++ Forum | 1 | 01-Feb-2005 21:26 |
| Creating N string | gwk | C Programming Language | 3 | 20-Jul-2004 23:27 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The