[PHP] Re: Array: If i'm in the child array then how I tell the parent's key name..

2005-09-30 Thread M. Sokolewicz
Let me reply with a question first :) how do you get *to* the child? ;) post some code so we know. In 99.99% of the cases, the way you get to the child includes a way to find out the parent key (usually you foreach() to it, or something similair). - tul Scott Fletcher wrote: Suppose that I'm

[PHP] RE: Array --> If

2003-11-05 Thread Jason Williard
Thanks! That did the trick. Jason Williard -Original Message- From: Greg Beaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 6:55 PM To: Jason Williard Cc: [EMAIL PROTECTED] Subject: Re: Array --> If Hi Jason, perhaps: Regards, Greg -- phpDocumentor http://www.phpdo

[PHP] Re: Array --> If

2003-11-05 Thread Greg Beaver
Hi Jason, perhaps: $cases = array(5, 15, 30, 60, 90, 120); if (in_array($count, $cases)) { include 'page.php'; } ?> Regards, Greg -- phpDocumentor http://www.phpdoc.org Jason Williard wrote: I am building a script that I would like to have do a specific task based on whether specific c

RE: [PHP] Re: ARRAY, IF & INSERT

2002-06-24 Thread César Aracena
> the name <> 0 was a sql-query - it will return a ressource which will > enable you to make something like > > $i=0; > while($row = mysql_fetch_assoc($nameless_result){ > > #psuedo-code# > # mysql_query=("insert into table set relativenumber = 'jr$i' where > ID=$row["ID"]"); > } [César L. Arac

Re: [PHP] Re: ARRAY, IF & INSERT

2002-06-23 Thread Jesper Brunholm
César aracena wrote: > The catch would be to make PHP to auto assign the relatives "level" by > knowing it has to start from $i=1 and loop $i++ until no other kid is > inserted. Now that I write it, it seems I could use a for loop, but what > should be the structure of it using the $name <> 0 you

RE: [PHP] Re: ARRAY, IF & INSERT

2002-06-21 Thread César Aracena
L PROTECTED]] > Sent: Friday, June 21, 2002 6:56 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] Re: ARRAY, IF & INSERT > > (i am new to these groups, but shouldn't there be a follow-up-to on a > X-post?) > > César aracena wrote: > > I have th

[PHP] Re: ARRAY, IF & INSERT

2002-06-21 Thread Jesper Brunholm
(i am new to these groups, but shouldn't there be a follow-up-to on a X-post?) César aracena wrote: > I have this form in which one Administrator can insert new members and > after that, in another page, a form where he/she can insert the new > member’s sons & daughters. I want to display a tabl