[PHP] Array Simplification

2003-07-22 Thread jwulff
I've got a nested array below that I'm having some trouble simplyfing.
Here is an example of how the array is now:

Array
(
[0] = Array
(
[0] = 2003-06-10 17:00:00
[1] = 9054.89
)

[1] = Array
(
[0] = 2003-06-10 17:00:00
[1] = 153.84
)
)

As you can see the dates are redundant, I'd really like nested array's with
the same date combined as follows.

Array
(
[0] = Array
(
[0] = 2003-06-10 17:00:00
[1] = 9054.89
[2] = 153.84
)
)


Thanks!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] FTP Synching

2003-07-22 Thread jwulff
How would I download any new files on a remote machine to my local one (in a
specific folder) via ftp?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CSV import

2003-07-21 Thread jwulff
When using something like this:
LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\r\n'

How do I also insert a field not in the CSV.  For example there are 8 fields
in the CSV and 9 in the table.  I want the ninth field to be the name of the
CSV file.  How do I do this?  Can't find any mention of it on mysql.com.

John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] same operation to multiple files

2003-07-21 Thread jwulff
I've built a CSV parser that I want to run on every file in a folder.  How
do I do this?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Converting a MySQL result into a complex array

2003-07-21 Thread jwulff
How would I take the results of the following MySQL statement and put it
into an array as follows?

SELECT * FROM numbers WHERE type=`1`;
SELECT * FROM numbers WHERE type=`2`;

$example_data = array(
 array(1,25,8),
 array(2,10,8)
);

All the results of type=`1` would be in the first nested array and all the
results of type=`2` would be in the second and so on.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Removing array element by key

2003-07-10 Thread jwulff
How do i remove an element of an array by its key?  I've tried
array_s(p)lice to no avail.  Either it chops too much or too little with
seemingly no logic.  The array is of unkown and variable size if that makes
a difference.  Thanks, John.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Removing Arrays With Certain Keys From Larger Array

2003-07-08 Thread jwulff
I have an array exampled below.  I want to remove and use certain nested
arrays from the larger array where the key == title, size, day, etc...  How
does an idiot like myself accomplish this?

Array
(
[0] = Array
(
[0] = title
[1] = by Month for Melvin
)

[1] = Array
(
[0] = Jan-99
[1] = 5286.69
[2] = 4687.89
[3] = 88.71
[4] = 98.05
[5] = 9.04
)
)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Calculating if number is multiple of another number

2003-07-02 Thread jwulff
How would I calculate if a $number is a multiple of $spacer?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php