![]() |
How do I code this array
I want to write a script that will read in a css file, allow the user to alter the settings via a form and then save the file. The problem I'm having is in figuring out the best way to cross-reference the array I read in and the fields read from the form. This is the code I wrote to read in the css file. It creates a multi-array with each class from the css file in its only array.
Code:
function GetClasses($cssFile)Code:
ArrayCode:
<input type="text" name="nav_float"Code:
<input type="text" name="0_0_nav_float" |
Hi Benton,
In the HTML-Form just write: HTML Code:
<input type="text" name="nav[float]" />Code:
$_POST['nav'] = array(Greetings, Alex |
Oh, I understand what you're asking now. Awuehr's solution looks as though it might work, and work very well, too!
|
Quote:
Let's say there is one class in the css file so when the file is read in, the array will appear as Code:
ArrayCode:
$_POST['nav'] = array(Code:
[0] => #nav, #nav ulCode:
foreach ($1stArray as $array) {Code:
<input type="text" name="#nav, #nav ul {" |
| All times are GMT. The time now is 09:18 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0