> I have an two dimensional array that is returned from code from an included
> file. I'm assigning parts of the array to variables ( $variable =
> $array["key"]["value"]; ). This works fine and can be printed until I send
> it through a function eg. ( ereg_replace(" ", "_", "$variable"); ). After
> this, $variable is blank.
> I don't think it's my code because substituting a text string for the array
> data (eg. $variable = "this is some text";) works just fine.
> It has something to do with the assigning array data to a variable or
> perhaps that the data comes from an included file... This could be a bug in
Could you post some excerpted code please?
You seem to have multiple issues:
1 communication between a 'mainline' and INCLUDEd code
2 communication between a 'mainline' and a function
3 working with scalars and arrays
4 working with text strings and ?text arrays
- which may or may not be related/relevant
Let's start with simple ideas:
0 put debug echo statements into the function (or everywhere) to track progress
1 if you take the processing code out of the INCLUDE file and put it in the
'mainline', does it then work as planned?
2 do you have an & to indicate a pass by reference cf a pass by value (see manual)?
3 and 4 does the processing use tools/approach/functions that only work with
A process of elimination...
Keep us posted,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]