On Sun, 2010-07-18 at 09:49 +0430, shahrzad khorrami wrote:
> hi all :)
> here is a xml file:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> .
> .
> .
> .
> I have a xml file with a name fo
hi all :)
here is a xml file:
.
.
.
.
I have a xml file with a name for example(test.xml)..
and 3 tables of database, (group,directives,rules)
group is for recording the name of the
--- Begin Message ---
Hi Guys,
I found the problem. I was using the error suppression operator on my
include, and thus I could not see the syntatic error on the page.
Problem Solved,
- Craige
Yeti wrote:
Some code would be quite helpful here. But your scenario should not
make any problem.
Works for me:
$ cat recurses.php ; php -q recurses.php
4! = 24
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Craige - In short, yes you can recursively call a static method. The
following code, for example, will work fine:
However, you'll probably notice if you try it, that the example above only
calls the test() method twice. This is because it's using include_once, and
thus the code within the inclu
Some code would be quite helpful here. But your scenario should not
make any problem.
EXAMPLE:
";
include_once('test.php');
}
}
foo::test();
?>
EXAMPLE (@file: test.php):
OUTPUT:
Call 1Call 2
//A yeti
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
Hi Guys,
Quick question: can a static method in PHP be recursive, or is there
some sort of weird law against this? Ihave my method setPrereq that can
essentially call itself (well, it includes a file which may call the
setPrereq method, so essentially it is recursive).
I've done some tests,
On Wed, 2008-11-05 at 09:11 -0500, Joe Schaeffer wrote:
> >> I would say to do that with CSS, not building it into the output.
>
> That's actually how I've got things set up now -- I just rarely trust
> the house-of-cards that is nested lists in CSS (and I've gone and
> complicated things with fir
>> I would say to do that with CSS, not building it into the output.
That's actually how I've got things set up now -- I just rarely trust
the house-of-cards that is nested lists in CSS (and I've gone and
complicated things with first-child selectors all over the place)!
Thanks, all, for the grea
On Tue, 2008-11-04 at 07:51 -0800, Jim Lucas wrote:
> Joe Schaeffer wrote:
> >> Joe,
> >>
> >> Here is a simplified recursive version of your above statement.
> >>
> >> >> $dir = '.';
> >> function displayDir($dir='.') {
> >>$show = FALSE;
> >>$results = glob($dir.'/*');
> >>
On Tue, 2008-11-04 at 09:56 -0500, Joe Schaeffer wrote:
> > Joe,
> >
> > Here is a simplified recursive version of your above statement.
> >
> > > $dir = '.';
> > function displayDir($dir='.') {
> >$show = FALSE;
> >$results = glob($dir.'/*');
> >foreach ( $results AS $entr
> -Original Message-
> From: Joe Schaeffer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 04, 2008 8:56 AM
> To: Jim Lucas
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Recursive Directory Listing
>
> > > $dir = '.';
> > fu
Joe Schaeffer wrote:
>> Joe,
>>
>> Here is a simplified recursive version of your above statement.
>>
>> > $dir = '.';
>> function displayDir($dir='.') {
>>$show = FALSE;
>>$results = glob($dir.'/*');
>>foreach ( $results AS $entry ) {
>>if ( is_dir($entry) &
Joe Schaeffer wrote:
Joe,
Here is a simplified recursive version of your above statement.
';
foreach ( $dirs AS $entry ) {
echo '', basename($entry);
displayDir($entry);
echo '';
}
> Joe,
>
> Here is a simplified recursive version of your above statement.
>
> $dir = '.';
> function displayDir($dir='.') {
>$show = FALSE;
>$results = glob($dir.'/*');
>foreach ( $results AS $entry ) {
>if ( is_dir($entry) && !in_array($entry, array('.', '
At 12:13 PM -0400 10/30/08, Joe Schaeffer wrote:
I have a (readable) directory structure like so:
../navigation
/cats
/dogs
/beagles
/collies
/some/other/dirs/
/horses
I need to display those directories in nested html lists (marked up
with css). Using PH
Joe Schaeffer wrote:
> Thanks, all, for pointing me to the SPL iterators. i've been hunting
> around and i've managed to come up with a working script. I know it
> could be better, though. I know this is terribly inefficient -- a lot
> of manual repetition and no recursion. Here's what I've got,
>
Thanks, all, for pointing me to the SPL iterators. i've been hunting
around and i've managed to come up with a working script. I know it
could be better, though. I know this is terribly inefficient -- a lot
of manual repetition and no recursion. Here's what I've got,
commenting my concerns:
';
fore
Joe Schaeffer schreef:
> Well, that makes things much easier (and that should teach me to rely
> on a 5-year-old O'Reilly book...)! Thanks for the help!
>
> I'm able to display all the contents of the correct dirs and subdirs,
> but I'm struggling with my implementation. Since I'm trying to nest
>
On Thu, 2008-10-30 at 15:28 -0400, Joe Schaeffer wrote:
> Well, that makes things much easier (and that should teach me to rely
> on a 5-year-old O'Reilly book...)! Thanks for the help!
>
> I'm able to display all the contents of the correct dirs and subdirs,
> but I'm struggling with my implement
On Thu, Oct 30, 2008 at 3:28 PM, Joe Schaeffer <[EMAIL PROTECTED]> wrote:
> Well, that makes things much easier (and that should teach me to rely
> on a 5-year-old O'Reilly book...)! Thanks for the help!
>
> I'm able to display all the contents of the correct dirs and subdirs,
> but I'm struggling
Well, that makes things much easier (and that should teach me to rely
on a 5-year-old O'Reilly book...)! Thanks for the help!
I'm able to display all the contents of the correct dirs and subdirs,
but I'm struggling with my implementation. Since I'm trying to nest
unordered lists, I can't seem to '
Joe Schaeffer schreef:
> New to PHP development, new to the list; searched the archives but
> didn't find an answer (or at least nothing i could successfully
> adapt).
>
> I have a (readable) directory structure like so:
>
> ../navigation
> /cats
> /dogs
> /beagles
> /coll
New to PHP development, new to the list; searched the archives but
didn't find an answer (or at least nothing i could successfully
adapt).
I have a (readable) directory structure like so:
../navigation
/cats
/dogs
/beagles
/collies
/some/other/dirs/
/horses
This one time, at band camp, David Lidstone <[EMAIL PROTECTED]> wrote:
> which with hindsight is completely illogical! I also wasn't aware of the
> constants. Is there a simple tutorial / docs you know of for SPL?
http://www.phpro.org/tutorials/Introduction-to-SPL.html
Kevin
--
PHP General
David Lidstone schreef:
Thanks very much to both of you.
This does the trick! I had (stupidly) tried:
foreach ($c as new RecursiveIteratorIterator($item))
which with hindsight is completely illogical! I also wasn't aware of the
constants. Is there a simple tutorial / docs you know of for SPL?
Thanks very much to both of you.
This does the trick! I had (stupidly) tried:
foreach ($c as new RecursiveIteratorIterator($item))
which with hindsight is completely illogical! I also wasn't aware of the
constants. Is there a simple tutorial / docs you know of for SPL? I have
tried numerous g
On Sun, Sep 7, 2008 at 11:05 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> David Lidstone schreef:
>
>> Hi
>>
>> I am getting myself quite confused while trying to use SPL to recursively
>> iterate through a collection of objects, and any help would be greatly
>> appreciated!
>>
>> My collection of
David Lidstone schreef:
Hi
I am getting myself quite confused while trying to use SPL to
recursively iterate through a collection of objects, and any help would
be greatly appreciated!
My collection of objects is contained in a class (which I frequently use
to iterate through objects stored
Hi
I am getting myself quite confused while trying to use SPL to
recursively iterate through a collection of objects, and any help would
be greatly appreciated!
My collection of objects is contained in a class (which I frequently use
to iterate through objects stored in an array in the class
Manuel Pérez López wrote:
> Hello everyone:
>
> Is it possible to do recursive this function?
>
> I can write it so linear. But only a finite number of loops.
Please explain which problem you're trying to solve - it'll be easier to
determine whether your problem has a recursive solution or not
Hello everyone:
Is it possible to do recursive this function?
I can write it so linear. But only a finite number of loops.
Thanks.
Manuel Perez
This is:
function ($field, $arr_secuence_reverse)
{
if (count($arr_secuence_reverse) == 1)
{
return
getPrimaryKey4
Thanks! I don't understand how it works, but it does! That's the main
thing!
I've been pulling my hair out over this for the last two days.
You're a legend!
Thanks again,
Stewart
On 27/04/2007, at 8:28:41 PM, [EMAIL PROTECTED] wrote:
First versions got a bug, i did not merged the groups w
First versions got a bug, i did not merged the groups when found a pair
which should connect them.
This one is better:
array('X'),
"C" => array('Q','K'),
"D" => array('M'),
"F" => array('V'),
"G" => array('N'),
"I" => array('X','M'),
"K" => array('C'),
"M" => array(
On 27/04/2007, at 7:57:45 PM, Edward Kay wrote:
Interesting problem. I've got a few ideas but please could you
clarify what
you want as the output? Is it just an array of the groups, i.e.
Array
(
[0] => 'B,X,I,M,V,F,D'
[1] => 'C,Q,K'
[2] => 'G,N'
[3] => 'R,U'
)
What you want is strange...
but this is the solution
array('X'),
"C" => array('Q','K'),
"D" => array('M'),
"F" => array('V'),
"G" => array('N'),
"I" => array('X','M'),
"K" => array('C'),
"M" => array('I','V'),
"Q" => array('C'),
"R" => array('U'),
"V" =>
> -Original Message-
> From: Stewart Macdonald [mailto:[EMAIL PROTECTED]
> Sent: 27 April 2007 10:13
> To: php-general@lists.php.net
> Subject: [PHP] Recursive function for array task?
>
>
> Hi all,
>
> I've got a bit of a logic problem that I can&
Hi all,
I've got a bit of a logic problem that I can't figure out.
I've got an array:
Array
(
[B] => X
[C] => Q,K
[D] => M
[F] => V
[G] => N
[I] => X,M
[K] => C
[M] => I,V
[Q] => C
[R] => U
[V] => M
[X] => I
)
This array shows groupings of object
# [EMAIL PROTECTED] / 2006-12-08 10:59:51 +1100:
> Roman Neuhauser wrote:
> ># [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100:
> >>I wrote a recursive function, but when running the function appache
> >>stalls, the error log says:
> >>
> >>module mod_php4.c is already running, skipping
> >
> >T
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100:
I wrote a recursive function, but when running the function appache stalls,
the error log says:
module mod_php4.c is already running, skipping
That has nothing to do with the function call.
Is this a bug, or am I
# [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100:
> I wrote a recursive function, but when running the function appache stalls,
> the error log says:
>
> module mod_php4.c is already running, skipping
That has nothing to do with the function call.
> Is this a bug, or am I doing something wr
n: Sjef
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] recursive function problem
On Thu, 2006-12-07 at 13:41 +0100, Sjef wrote:
> Hello!
> I wrote a recursive function, but when running the function appache
stalls,
> the error log says:
Did you write a recursive function to send thi
On Thu, 2006-12-07 at 13:41 +0100, Sjef wrote:
> Hello!
> I wrote a recursive function, but when running the function appache stalls,
> the error log says:
Did you write a recursive function to send this mail to this list
perhaps?
--Paul
All Email originating from UWC is covered by disclaimer
Hello!
I wrote a recursive function, but when running the function appache stalls,
the error log says:
module mod_php4.c is already running, skipping
Is this a bug, or am I doing something wrong?
Thanxs, Sjef
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Hello!
I wrote a recursive function, but when running the function appache stalls,
the error log says:
module mod_php4.c is already running, skipping
Is this a bug, or am I doing something wrong?
Thanxs, Sjef
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Sjef wrote:
> Hello!
> I wrote a recursive function, but when running the function appache stalls,
> the error log says:
>
> module mod_php4.c is already running, skipping
this error message is from the apache start up routine - you seem to
loading the php4 apache module twice. fix you apache co
If you show some code maybe somebody on the list can help you.
On Thu, 7 Dec 2006 13:41:00 +0100, "Sjef" <[EMAIL PROTECTED]> wrote:
> Hello!
> I wrote a recursive function, but when running the function appache
> stalls,
> the error log says:
>
> module mod_php4.c is already running, skipping
>
Hello!
I wrote a recursive function, but when running the function appache stalls,
the error log says:
module mod_php4.c is already running, skipping
Is this a bug, or am I doing something wrong?
Thanxs, Sjef
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
On Sat, Feb 18, 2006 at 06:07:16PM -0500, tedd wrote:
> >On 2/18/06, tedd <[EMAIL PROTECTED]> wrote:
> >> Hi gang:
> >>
> >> Question: I know you can set a directory to have certain permissions,
> >> but how do you set the permissions to be recursive? In other words,
> >> for example, if you set th
I am aware of how to change the contents of a directory to a specific
chmod using a recursive php routine, but I was looking for a simpler way.
That's the only way.
Doing it through ftp, the ftp program does the recursive stuff - not the
ftp server.
--
PHP General Mailing List (http://www.
On 2/19/06, tedd <[EMAIL PROTECTED]> wrote:
> Perhaps this is something limited to GoLive and not an option in
> setting chmod's via php's built-in functions.
This is clearly depending on the host OS/ftp daemon and what
permission is set on the upload folder. What GoLive! probably does
with that c
On 2/18/06, tedd <[EMAIL PROTECTED]> wrote:
Hi gang:
Question: I know you can set a directory to have certain permissions,
but how do you set the permissions to be recursive? In other words,
for example, if you set the directory to be 755, then everything
placed within that directory will a
On 2/18/06, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
> Question: I know you can set a directory to have certain permissions,
> but how do you set the permissions to be recursive? In other words,
> for example, if you set the directory to be 755, then everything
> placed within that directory wi
Hi gang:
Question: I know you can set a directory to have certain permissions,
but how do you set the permissions to be recursive? In other words,
for example, if you set the directory to be 755, then everything
placed within that directory will also be 755.
Thanks.
tedd
--
---
On Thu, January 26, 2006 2:50 am, Kim Christensen wrote:
> Has anyone out there stumbled over the issue of making
> multi-dimensional arrays out of bracket-separated strings? In a less
> fuzzy way of putting it:
>
> $str = "[layer1][layer2][layer3][layer4]"
>
> would become
>
> $str_array = Array(
Kim,
After some contemplation (and slightly less crack):
$array);
}
print_r($array);
?>
Array
(
[layer1] => Array
(
[layer2] => Array
(
[layer3] => Array
(
[layer4] => FOO
Kim Christensen wrote:
Has anyone out there stumbled over the issue of making
multi-dimensional arrays out of bracket-separated strings? In a less
fuzzy way of putting it:
$str = "[layer1][layer2][layer3][layer4]"
would become
$str_array = Array( [layer1] => Array( [layer2] => Array( [layer3]
Kim,
May the hack-o-rama commence:
It works, but I'm not proud. :P
David
--
David Grant
http://www.grant.org.uk/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 1/26/06, Kim Christensen <[EMAIL PROTECTED]> wrote:
>
> I would really like PHP to have a function of building expressions
> with strings, and then execute them through a function - but that's
> just me it seems :-)
>
You mean like create_function() ?
-robin
Has anyone out there stumbled over the issue of making
multi-dimensional arrays out of bracket-separated strings? In a less
fuzzy way of putting it:
$str = "[layer1][layer2][layer3][layer4]"
would become
$str_array = Array( [layer1] => Array( [layer2] => Array( [layer3] =>
Array( [layer4] ) ) )
> Say I have an ancestry application where the users can enter
> parents, children, etc. The children have children, etc.
>
> table people
> id
> parent_id
>
> what is the best way to pull this from the db minimizing the
> number of queries to build a tree view of parents to chi
I am sure others have encountered this so I am just looking for ideas.
Say I have an ancestry application where the users can enter parents,
children, etc. The children have children, etc.
table people
id
parent_id
what is the best way to pull this from the db minimizing the number
Hi all.
I can't seem to figure this one out. I am trying to output a string
for a javascript that builds a DHTML tree. The sample string looks
like this:
[
['Executive Director', null, null,
['Executive Assistant ', null, null],
['Operations Director', null, null,
Gerard Samuel wrote:
Im trying to figure out how to create this.
But Im stuck in the foreach loop.
For some reason, $value in the foreach loop is not an object (Isn't is
supposed to be?)
Any hints to get me in the right direction.
Thanks
$array = array(1 => array(2 => array(3 => array(4;
clas
Im trying to figure out how to create this.
But Im stuck in the foreach loop.
For some reason, $value in the foreach loop is not an object (Isn't is
supposed to be?)
Any hints to get me in the right direction.
Thanks
$array = array(1 => array(2 => array(3 => array(4;
class recursiveArrayItera
This is my first time trying out the SPL iterators.
Im trying to figure out how to recursively move over a directory.
With the code that I've provided
1. Is this the correct way to use it? Im using recursive functions to
go deep.
I thought, that the class would do that for me somehow...
2. A
function recursePathLookup($CatID, $Path = array()) {
//Get the catid for this subcat
$sql = "SELECT SubCategoryID, Name FROM categories WHERE CategoryID =
'".$CatID."'";
$query = mysql_query($sql);
if(mysql_num_rows($query) == 1) {
$data = mysql_fetch_array
Ah yes, thanks. Looks like it's mentioned here:
http://marc.theaimsgroup.com/?l=php-dev&m=109405450709578&w=2
Doesn't look like it's going to happen too soon though based on Sara's
comment: "and I havn't personally had the motivation to actually get it
done."
Looks like there's some traction
Chuck Wolber wrote:
> On Mon, 4 Oct 2004, Michael Sims wrote:
>> What's ugly about it? I saw your earlier post I was actually
>> planning on responding and suggesting something exactly like you
>> just came up with.
>
> The main problem (aside from performance, which you addressed) is
> that it do
if you check the internals archive, i think Sara said she had an
interpolator on her plate...
"Chuck Wolber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Mon, 4 Oct 2004, Michael Sims wrote:
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
On Mon, 4 Oct 2004, Michael Sims wrote:
> Chuck Wolber wrote:
> > The method I've come up with in the meantime, I believe is much more
> > effective than heredocs, but still an ugly hack:
> >
> > function interpolate ($text, $msg_variable) {
> > $msg_key = '_FP_VAR_';
> >
> > foreach (arra
Chuck Wolber wrote:
> The method I've come up with in the meantime, I believe is much more
> effective than heredocs, but still an ugly hack:
>
> function interpolate ($text, $msg_variable) {
> $msg_key = '_FP_VAR_';
>
> foreach (array_keys($msg_variable) as $key) {
> $token = $msg_
On Mon, 4 Oct 2004, Chuck Wolber wrote:
> Database *FIELD* with text data in it. The text data contains sentences
> interspersed with $foo['bar'] array variables. The idea is that when one
> selects this field, PHP will interpolate $foo['bar'] with the currently
> defined $foo array variable. T
Greetings,
I've seen a few posts from the middle of last year discussing the problem
of recursive interpolation:
http://marc.theaimsgroup.com/?l=php-general&m=105543152906744&w=2
http://marc.theaimsgroup.com/?l=php-general&m=105542523331255&w=2
It seems there's a HEREDOC method of hacking thro
Hey everyone. I'm looking for assistance/suggestions/answers on how to
build a select dropdown box from data that needs to be pulled recursively
from a MySQL database. Basically the situation is mainly for a dicussion
thread system type of thing where I have categories nested inside
categories, n
Binay, et al --
...and then Binay said...
%
% Hi all,
Hiya!
%
% is there function which scans a particual directory recurisly and stores the content
in array or other way? Listing of files should be in alphabetical way and directories
should come on top.
Yep. Get the File_Find pear module
On Wed, 2004-02-04 at 22:36, Binay wrote:
> is there function which scans a particual directory recurisly and stores the content
> in array or other way? Listing of files should be in alphabetical way and
> directories should come on top.
>
Currently there is not a function that will go down re
Hi all,
is there function which scans a particual directory recurisly and stores the content
in array or other way? Listing of files should be in alphabetical way and directories
should come on top.
Thanks
Binay
> "Joachim" == Joachim Krebs <[EMAIL PROTECTED]> writes:
Joachim> Perhaps it is time to break the record.
Joachim> Evan Nemerson wrote:
>> How can you forget the Hurd???
Xinu Is Not Unix
also
MT XINU is UNIX TM backwards
--
no toll on the internet; there are paths of many kind
Perhaps it is time to break the record.
Evan Nemerson wrote:
How can you forget the Hurd???
http://www.gnu.org/software/hurd/hurd.html#name:
"According to Thomas Bushnell, BSG, the primary architect of the Hurd:
`Hurd' stands for `Hird of Unix-Replacing Daemons'. And, then, `Hird' stands
for `
How can you forget the Hurd???
http://www.gnu.org/software/hurd/hurd.html#name:
"According to Thomas Bushnell, BSG, the primary architect of the Hurd:
`Hurd' stands for `Hird of Unix-Replacing Daemons'. And, then, `Hird' stands
for `Hurd of Interfaces Representing Depth'. We have here, to my kn
Becoming Digital wrote:
Personally, I love things like this. I have a feeling that those of us not fond of such recursive acronyms are also not fan's of the old "Who's on first?" routine.
I don't give a damn. ;)
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing
hy | www.amazon.com/o/registry/EGDXEBBWTYUU
- Original Message -
From: "Nathan Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Joachim Krebs" <[EMAIL PROTECTED]>
Sent: Saturday, 01 November, 2003 16:28
Subject: Re: [PHP] recursive acronym -
: Re: [PHP] recursive acronym - PHP
Or LAME for "Lame Ain't an MP3 Encoder"
Larry E . Ullman wrote:
>> Why PHP is a recursive acronym?, I know that before was called
>> Personal Home Page, I now is Hypertext PreProcessor, but why is
>> recursive?,
: Re: [PHP] recursive acronym - PHP
Or LAME for "Lame Ain't an MP3 Encoder"
Larry E . Ullman wrote:
>> Why PHP is a recursive acronym?, I know that before was called
>> Personal Home Page, I now is Hypertext PreProcessor, but why is
>> recursive?,
Or LAME for "Lame Ain't an MP3 Encoder"
Larry E . Ullman wrote:
Why PHP is a recursive acronym?, I know that before was called
Personal Home Page, I now is Hypertext PreProcessor, but why is
recursive?, I person told me that it could be wroten as Pre Hypertxt
Processor, thanks.
PHP stands for
Why PHP is a recursive acronym?, I know that before was called
Personal Home Page, I now is Hypertext PreProcessor, but why is
recursive?, I person told me that it could be wroten as Pre Hypertxt
Processor, thanks.
PHP stands for "PHP: Hypertext Preprocessor". It's called a recursive
acronym be
> Why PHP is a recursive acronym?, I know that before was called Personal
Home
> Page, I now is Hypertext PreProcessor, but why is recursive?, I person
told
> me that it could be wroten as Pre Hypertxt Processor, thanks.
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
Why PHP is a recursive acronym?, I know that before was called Personal Home Page, I
now is Hypertext PreProcessor, but why is recursive?, I person told me that it could
be wroten as Pre Hypertxt Processor, thanks.
I'm trying to do some recursive work with classes. And I run in to problems
executing the recursive actions outside the constructor.
I've narrowed it down to this, its simply returning levelnumbers as of know,
but the problem still exists.
this does not work, it only goes to level 2, where is shou
>I am building a recursive Menu object. Inside each menu item there is an
>array which should allow me to add submenu items and so on. I am having
>trouble, though, with getting the submenus to stay. They are
>disappearing as I go along.
Without really going through your code (sorry) I would ha
I am building a recursive Menu object. Inside each menu item there is an array which
should allow me to add submenu items and so on. I am having trouble, though, with
getting the submenus to stay. They are disappearing as I go along.
Here is the menu class: (part of it anyway)
class Menu {
Hi,
May this can help you:
$value)
{
$tmp[$key] = $value;
}
$tmp['indent'] = $indent;
$ret_tree[] = $tmp;
tree($tmp['id'], $indent+1);
}
}
Hello,
If anyone have expamples of displaying tree structure.
Say I have array $result[x][y] with folloowing data
XY["ID"]Y["OWNER"]
01 0
12 1
23 2
34 2
45 3
56 2
67
> If it's genuinely one line per $info[] element, just add the
dad-blamed
> to your echo:
>
> ';
} ?>
>
Also, just an FYI to the OP, you may want to calculate sizeof($info)
before hand, and use a variable in your for() statement. That way it
doesn't have to calculate sizeof() each loop...
--
Thanks everyone! Works great! :-) If only I would have noticed how obvious
it was before trying making it more difficult than I had to.
--
Kyrie Eleison,
Rick
www.spiritsword.com/phpBB2/
Mike Ford wrote:
>> -Original Message-
>> From: Rick Beckman [mailto:[EMAIL PROTECTED]]
>> Sent: 02
> -Original Message-
> From: Rick Beckman [mailto:[EMAIL PROTECTED]]
> Sent: 02 October 2002 12:12
>
>
>
> That line of code successfully will display lines 7 and on of
> an included
> text file into my HTML boilerplate. However, in my hundreds
> of source text
> files, "" is not incl
Hi Rick,
> How can I combine that line of code with
> str_replace() or some other replace function
> in order to turn "\n" into "" for each line.
I think you're looking for http://www.php.net/nl2br. Specifically:
for ($i = 7; $i < sizeof($info); $i+=1)
echo nl2br($info[$i]);
Cheers
That line of code successfully will display lines 7 and on of an included
text file into my HTML boilerplate. However, in my hundreds of source text
files, "" is not included at the end of the lines, therefore lines 7 and
on appear as one chunk of text, rather than neatly formatted lines. How ca
hi i have been trying to sought out a recursive hierarchical menu populated
from mysql how is this possible ? i have tried this but doesnt work
$result = $db->query("SELECT * FROM mainsection ms LEFT JOIN subsections
ss ON ms.sectionID=ss.mainsectionID ORDER BY ms.sectionID,ss.subsectionID");
w
1 - 100 of 117 matches
Mail list logo