Re: [PHP] Finding next recored in a array

2007-09-20 Thread brian
tedd wrote: At 4:14 PM -0400 9/19/07, brian wrote: tedd wrote: >>> Duh? You program for that -- you want me to write the entire code? ~sigh~ Grasshopper, the point i was trying to make is that your example displays what *not* to do with array_search(). Though a wonderful teaching aid in

Re: [PHP] Finding next recored in a array

2007-09-20 Thread tedd
At 4:14 PM -0400 9/19/07, brian wrote: tedd wrote: At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the la

Re: [PHP] Finding next recored in a array

2007-09-19 Thread brian
tedd wrote: At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the s

Re: [PHP] Finding next recored in a array

2007-09-19 Thread tedd
At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Richard Kurth
Jim Lucas wrote: REVISED Try this ## Switched to an indexed array with the day as the value instead of the key $Campaign_array[] = $row['day']; } # At this point you have arrays as values for your $Campaign_array # So, unless $k is an array that matches a sub array of $Campaign_array # y

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Richard Kurth
Jim Lucas wrote: Richard Kurth wrote: $query = "SELECTday FROMemailcampaign wherecampaign_id = '$emailcampaign' ANDmember_id = '$members_id' "; $DB_Change_Campaign_Results = safe_query($query); while ( $row = mysql_fetch_array($DB_Change_Campaign

Re: [PHP] Finding next recored in a array

2007-09-17 Thread M. Sokolewicz
Richard Kurth wrote: What I am trying to is get all the days from a table where email campaign = number. and then look at the last day that was sent and find it in the list and get the next day that follows that day. At this point the script below is not working. So if you have any Ideas that

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
Richard Kurth wrote: include ("includes/location.php"); $query = "SELECTday FROMemailcampaign wherecampaign_id = '1' ANDmember_id = '8' "; $DB_Change_Campaign_Results = safe_query($query); $Campaign_array = array(); while ( $row = mysql_fetch_assoc($DB_

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
REVISED Try this http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Richard Kurth
brian wrote: Richard Kurth wrote: What I am trying to is get all the days from a table where email campaign = number. and then look at the last day that was sent and find it in the list and get the next day that follows that day. At this point the script below is not working. So if you have

Re: [PHP] Finding next recored in a array

2007-09-17 Thread brian
Richard Kurth wrote: What I am trying to is get all the days from a table where email campaign = number. and then look at the last day that was sent and find it in the list and get the next day that follows that day. At this point the script below is not working. So if you have any Ideas tha

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Richard Kurth
M. Sokolewicz wrote: Rick Pasotto wrote: On Sun, Sep 16, 2007 at 06:04:45PM -0700, Richard Kurth wrote: Richard Kurth wrote: Rick Pasotto wrote: On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
Richard Kurth wrote: $query = " SELECT day FROMemailcampaign where campaign_id = '$emailcampaign' AND member_id = '$members_id' "; $DB_Change_Campaign_Results = safe_query($query); while ( $row = mysql_fetch_array($DB_Change_Cam

Re: [PHP] Finding next recored in a array

2007-09-17 Thread brian
tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that is the current number so I can select th

Re: [PHP] Finding next recored in a array

2007-09-17 Thread tedd
Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that is the current number so I can select the next reco

Re: [PHP] Finding next recored in a array

2007-09-17 Thread M. Sokolewicz
Rick Pasotto wrote: On Sun, Sep 16, 2007 at 06:04:45PM -0700, Richard Kurth wrote: Richard Kurth wrote: Rick Pasotto wrote: On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the n

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Rick Pasotto
On Sun, Sep 16, 2007 at 06:04:45PM -0700, Richard Kurth wrote: > Richard Kurth wrote: >> Rick Pasotto wrote: >>> On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: >>> Richard Kurth wrote: > $Campaign_array| = array('0','1','3','5','8','15','25');| > I know that I can fi

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Richard Kurth
Richard Kurth wrote: Rick Pasotto wrote: On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last nu

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Richard Kurth
Rick Pasotto wrote: On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how d

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Rick Pasotto
On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: > Richard Kurth wrote: >> $Campaign_array| = array('0','1','3','5','8','15','25');| >> I know that I can find the next recored in a array using next. What I do >> not understand is if I know the last number was say 5 how do I tell the >> scri

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Richard Kurth
brian wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that is the current number so I can select th

Re: [PHP] Finding next recored in a array

2007-09-16 Thread brian
Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that is the current number so I can select the next record