Well after 3 days of trying to figure this out --- maybe someone can guide me in the right direction.
I am using spaw WYSIWYG editor for a page. it allows for setting up an array to control where the picture files are uploaded to and retreived from.
well in one case i can get it to work right when i hard code the dir path in but when i try to dynamically change it using a variable the arrary returns a blank line.
this is where i am at now:
$spaw_imglibs = array(array('value' => 'images/user/$usermod/', 'text' => 'set in test2' ));
This is where I have been:
$userdir = "'images/user/" . $usermod . "/'",";
$spaw_imglibs = array(
array(
'value' => $userdir,
'text' => 'set in test2',
),
array(
'value' => 'images/user/arwizard68/',
'text' => '2set in test2',
),
array(
'value' => 'you/need/to/change/this/too/',
'text' => '4Not configured',
),
);
and i also tried this
$spaw_imglibs = array(
array(
'value' => $usermod,
'text' => 'set in test2',
),
array(
'value' => 'images/user/arwizard68/',
'text' => '2set in test2',
),
array(
'value' => 'you/need/to/change/this/too/',
'text' => '4Not configured',
),
);
I have tried many other variations that all should result in putting the variable in to the code in the proper place.
The system makes a dir for each user for them to store their pictures in, the full path is images/user/[then the user dir]. The var "usermod" comes from a cookie that is available site wide.
When i echo this just before and after where it is to put the variable -- the full path does show as being correct. Infact the hardcoded "2set in test 2" works just fine.
The question is this ---- > Why is the variable not being inserted when called. My quess is that the answer is real simple and i am just missing it.
any ideas would be appreciated. thanks dave