[PHP] array_unique() workaround?

2001-11-14 Thread Spunk S. Spunk III
I'm working on a script that needs array_unique() but my host is using 4.0.4 and it's broken in that build. Does anyone have a good workaround for this? I can wait for my host to upgrade but if I release this code, it would be better to have the workaround... I just need a good way to check for

Re: [PHP] array_unique() workaround? SOLUTION!

2001-11-14 Thread Spunk S. Spunk III
Thanks everyone for the ideas, Here's what I came up with... I forgot to mention that I needed to preserve the original array's keys. Here is a replacement I wrote that seems to work. Let me know if you see errors in it or have improvements. function my_array_unique($somearray) {

[PHP] is_null misses spaces... another solution?

2001-11-13 Thread Spunk S. Spunk III
I need to check variables for blank values but it appears that is_null and == return true if there is a space. Any other suggestions? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] is_null misses spaces... SOLUTION!

2001-11-13 Thread Spunk S. Spunk III
Ahh... and the winner is empty(). Thanks Christian for this elusive answer and everyone else for their input. Spunk I need to check variables for blank values but it appears that is_null and == return true if there is a space. Any other suggestions? Thanks -- PHP General

[PHP] variable gets lost in function problem again...

2001-10-26 Thread Spunk S. Spunk III
Sorry all but I really need to figure this out. Here's a recap of my problem: I have an two dimensional array that is returned from code from an included file. I'm assigning parts of the array to variables ( $variable = $array[key][value]; ). This works fine and can be printed until I send it

[PHP] passing a multi dimensional associative array...

2001-10-25 Thread Spunk S. Spunk III
Pardon me if I've been smoking too much crack but I can't seem to figure this one out... How do I pass an argument to a function that contains a value from multi dimensional associative array? or... How do I pass an variable as an argument that contains value taken from an array? or... Why

[PHP] argument variable gets lost in function

2001-10-25 Thread Spunk S. Spunk III
I'm assigning a variable a value from an associative array. $variable = $array[key][value]; Then passing the $variable to a function. SomeFunction($variable) The variable exists (can be printed) until a built-in function (within the original function) is called. echo $variable;

Re: [PHP] Re: argument variable gets lost in function

2001-10-25 Thread Spunk S. Spunk III
hmm...weird! is that the code? if you show us your real code...maybe you're missing a small detail... Sorry about the variable names... I can print the variable inside the function until it goes through ereg_replace. Then it's gone. The code works fine if I replace the line '$song =

[PHP] Change the filename sent via html header

2001-04-03 Thread Spunk S. Spunk III
I've got a script that returns a smil file in a header but I'd like to change the name of the file. The file is sent as blah.php (even though it is a smil file) but I'd like to be able to name it something like blah.sml. Is there a way to do this? Spunk -- PHP General Mailing List

Re: [PHP] Change the filename sent via html header

2001-04-03 Thread Spunk S. Spunk III
Okay, So here's what it looks like now: header("Content-type: application/x-quicktimeplayer"); header("Content-Disposition: attachment; filename=blah.qtl" ); print(GenerateSMILAlbum($baseURL, $directory, $mp3Array, $albumCover)); This gets me two download dialogs on windows machines if I select

Re: [PHP] Getting a header without ANY mime type

2001-03-22 Thread Spunk S. Spunk III
This would be part of a test tool I'd like to create in order to test conditions of an application. I want to send a request and ensure that the response has no set type or known length if possible (eg return some media that is undefined and see how the app handles the response). Anyone? Spunk

[PHP] Getting a header without ANY mime type

2001-03-21 Thread Spunk S. Spunk III
I've got a situation where I'm interested in returning a header without ANY mime type specified. It looks like the default Mime type is set by the server (plain text)? Or at least when I don't specify the type that's what my server is returning. I'd also like to ensure that there is no content