[PHP] Appending to an Array

2007-06-16 Thread Keith Spiller
Hi Folks, RE: Appending to an Array Here is my code: # PREVIOUS MONTH - $days = array( 10=array(/weblog/archive/2004/Jan/02,linked-day), 12=array(/weblog/archive/2004/Jan/03,linked-day),

Re: [PHP] Re: Appending to an Array

2007-06-16 Thread Keith Spiller
. is the concatenation operator, usually applies only to strings try: $days[] = array($this_day=array(#,today-day)); or actually: $days[$this_day] = array(#,today-day); since it looks like you're indexing based on the day Keith Spiller wrote: Hi Folks, RE: Appending to an Array Here is my code: # PREVIOUS

[PHP] Previous and Next Month and Year

2007-06-16 Thread Keith Spiller
Hi, RE: Previous and Next Month and Year This is my code: $next_month = date('F Y', time()+$month); $prev_month = date('F Y', time()-$month); echo $prev_month br / \n; #Result June 2007 echo $next_month br / \n; #Result June 2007 What I am trying to do is get the month and year

Re: [PHP] Re: Previous and Next Month and Year

2007-06-17 Thread Keith Spiller
e.g. now + 24 hours and so on, because you may need to take into account daylight savings times and such otherwise your calculations may be off. Vlad Keith Spiller wrote: Hi, RE: Previous and Next Month and Year This is my code: $next_month = date('F Y', time()+$month); $prev_month

[PHP] RE: [Updated] Previous and Next Month and Year

2007-06-18 Thread Keith Spiller
Hi Guys, RE: [Updated] Previous and Next Month and Year Here is part of my code: $month = 6; // Current month value, but changes changes with next/prev links. // Value used by a mini calendar script phpcalendar... // Originally derived via: $month = date('n', time()); // And updated

Re: [PHP] Sorting Multidimensional Array

2006-10-31 Thread Keith Spiller
the current month... If I could add the record to the Select statement as you suggest that would be wonderful. Keith - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Keith Spiller [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, October 31, 2006 10:48 AM

[PHP] Sorting Multidimensional Array

2006-10-31 Thread Keith Spiller
Hi, RE: Sorting Multidimensional Array I'm trying to sort a multidimensional array. The data was taken from a mysql query: $myrow = mysql_fetch_row($result) { query[] = $myrow; } The purpose is to retrieve the table data and manually add a record, then sort ASC by the startdate which is

[PHP] Manually Inserted Row

2006-10-31 Thread Keith Spiller
Hi, RE: Manually Inserted Row I'm using PHP to retrieve the values for the manual insert... I originally tried using an array created from the mysql query and adding one row manaually and then sorting the multidimensional array. As Richard pointed out, sorting using the database would be

[PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Keith Spiller
Hi, RE: Restore Leading Zeros in Zip Codes Does anyone happen to have a script that will restore the leading zeros in a mixed data set of 5 digit zip codes and 10 digit zip+4 codes? Any suggestions? Thanks, Keith

[PHP] mysql_query() vs query_database()

2008-10-01 Thread Keith Spiller
Hi, RE: mysql_query() vs query_database() What is the differences between mysql_query and query_database? Are both compatible with PHP 5 and MySQL 5? Is one faster than the other? Thank you for your help. Keith

[PHP] chown function

2005-10-03 Thread Keith Spiller
Hello, I'm using: chown($endpath, admin); to try to change the owner of directories after using mkdir() to create them. It continues to fail on my remote Fedora server. I know the path is correct because mkdir() works perfectly. Apache sets the owner as 48 when the directory is created. I am

Re: [PHP] chown function

2005-10-03 Thread Keith Spiller
11:27 PM Subject: Re: [PHP] chown function Keith Spiller wrote: I'm using: chown($endpath, admin); to try to change the owner of directories after using mkdir() to create them. It continues to fail on my remote Fedora server. With what error message? Have you tried logging in with SSH

[PHP] LOGOUT - Reset Session

2003-01-30 Thread Keith Spiller
Hello Everyone, I'm trying to create a Logout Function and Link. My site uses a standard htaccess file for its authentication method. After the brower requests the username and password they have access to the protected site. Then users can jump to a special Messaging section where I wrote a

[PHP] Form Passed Multidimension Array

2003-09-25 Thread Keith Spiller
Hello, I am trying to find out how to pass a multidimensional array within a hidden input of a form. Would it be something like this? input type='hidden' name='all_links' value='$all_links' Any advice would be forever appreciated... Keith

[PHP] Php Form Issue

2002-11-16 Thread Keith Spiller
Hello, I've managed to get a series of javascripts to work exactly as I wanted. They check all and uncheck all checkboxes with a single click of a control checkbox. Unfortunately, the information has to be sent to php. As soon as I add the [] brackets to an input name, the javascript no longer