On Mon, 2008-10-27 at 08:03 -0400, tedd wrote:
> At 12:33 AM -0700 10/27/08, Lars Torben Wilson wrote:
> >2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>:
> >>
> >> Hi, I am aware of this, but explaining my problem in this case would take
> >> me
> >> an hour --- and eventually would lead to a) mis
On Mon, 2008-10-27 at 00:33 -0700, Lars Torben Wilson wrote:
> 2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>:
> >
> > Hi, I am aware of this, but explaining my problem in this case would take me
> > an hour --- and eventually would lead to a) misunderstanding, b) weird
> > solution, c) no solution..
At 12:33 AM -0700 10/27/08, Lars Torben Wilson wrote:
2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>:
Hi, I am aware of this, but explaining my problem in this case would take me
an hour --- and eventually would lead to a) misunderstanding, b) weird
solution, c) no solution...
Forgive me if
2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>:
>
> Hi, I am aware of this, but explaining my problem in this case would take me
> an hour --- and eventually would lead to a) misunderstanding, b) weird
> solution, c) no solution...
Forgive me if I misunderstand, but it seems like you are willing to
2008/10/26 Martin Zvarík <[EMAIL PROTECTED]>:
PHP Version 5.2.4
I really don't like to use the EVAL function, but do I have choice??
This sucks.
Hi there,
While this question can spur some neat solutions, it raises a red flag
in that if you need to do this, you probably need to rethin
2008/10/26 Martin Zvarík <[EMAIL PROTECTED]>:
> PHP Version 5.2.4
>
> $node = '[5][1][]';
> ${'tpl'.$node} = 'some text';
>
> print_r($tpl); // null
> ?>
>
>
> I really don't like to use the EVAL function, but do I have choice??
> This sucks.
Hi there,
While this question can spur some neat solu
:-D :-D :-D :-D :-D :-D :-D :-D
ok :)
Robert Cummings napsal(a):
On Mon, 2008-10-27 at 02:09 -0400, Robert Cummings wrote:
On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote:
Even slimmer
It's buggy... you need to test for an blank string to properly handle
the append to arr
On Mon, 2008-10-27 at 02:09 -0400, Robert Cummings wrote:
> On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote:
> >
> > Even slimmer
> >
> > >
> > $node = '[5][1][]';
> > $text = 'some text';
> >
> > preg_match_all('|\[([^\]\[]*)\]|', $node, $matches,
> > PREG_PATTERN_ORDER);
> >
> > $recursiv
On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote:
>
> Even slimmer
>
>
> $node = '[5][1][]';
> $text = 'some text';
>
> preg_match_all('|\[([^\]\[]*)\]|', $node, $matches,
> PREG_PATTERN_ORDER);
>
> $recursive = $matches[1];
>
> $recursive = array_reverse($recursive);
>
> foreach ( $recurs
Jim Lucas wrote:
Martin Zvarík wrote:
Nope, you have to use the eval() everytime for read/write.
Wrong. Their is always more then one way to skin a cat!
$text);
$out = array();
foreach ( $recursive AS $index ) {
$out = array();
$out[(int)$index] = $in;
$in = $out;
}
Martin Zvarík wrote:
Nope, you have to use the eval() everytime for read/write.
Wrong. Their is always more then one way to skin a cat!
$text);
$out = array();
foreach ( $recursive AS $index ) {
$out = array();
$out[(int)$index] = $in;
$in = $out;
}
pr
Nope, you have to use the eval() everytime for read/write.
Martin Zvarík napsal(a):
No offense, but I thought it's obvious what I want to print.
print_r() shows null, and it should print what you just wrote = array
field.
It works when first defining with eval():
eval('$tpl'.$node.'=array(
No offense, but I thought it's obvious what I want to print.
print_r() shows null, and it should print what you just wrote = array field.
It works when first defining with eval():
eval('$tpl'.$node.'=array();');
I guess that's the only way.
Anyway, I appreciate your quick reply,
Martin
Jim L
Martin Zvarík wrote:
PHP Version 5.2.4
I really don't like to use the EVAL function, but do I have choice??
This sucks.
You should print the results that you are looking for!
Are you looking for something like this?
Array
(
[5] => Array
(
[1] => Array
PHP Version 5.2.4
I really don't like to use the EVAL function, but do I have choice??
This sucks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
15 matches
Mail list logo