Re: [PHP] Limiting an array to unique values

2004-04-06 Thread joel boonstra
. Item 1 Item 2 Item 3 How can I sort out the redundant values in that array? PHP's 'array_unique' function should help: http://php.net/array_unique -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] PHP Certification

2004-03-16 Thread joel boonstra
except that you gave them $10. -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
to determine which month something is in. Also, it relies on some potentially MySQL-specific syntax. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
(your_date) = '03'; then your result set will only have one row (the number of matching rows), and you don't need to do any additional counting work. However, all of that is for the OP, not for me, so I'm CCing the list back in. -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http

Re: [PHP] Get nice variables from POST

2004-03-11 Thread joel boonstra
, etc.). joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] perl, cgi and php

2004-03-10 Thread joel boonstra
will need to move ganttChart.cgi into a directory that is setup to handle CGI files -- sometimes you'll have a cgi-bin directory for this purpose. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write this correctly?

2004-03-06 Thread joel boonstra
['action']; if (in_array($action, $valid_actions)) { output($action) } else { # handle error somehow } ? To add more valid actions, you can just extend the array of valid actions, rather than adding clauses to the switch statement. joel -- [ joel boonstra | gospelcom.net

Re: [PHP] Best way to do this (sub selects?)

2004-03-04 Thread joel boonstra
/doc/en/SELECT.html [2] http://www.mysql.com/doc/en/GROUP-BY-Functions.html -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: why use safe mode?

2004-03-03 Thread joel boonstra
of traffic, and one is getting only a little, there won't be spare servers around to balance things out). I'm basing that all on what I read at Apache's site, so I may well be wrong. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread joel boonstra
transformation, so that these: bSome bold text/b BSome bold text/B bSome bold text/B will all get turned into: strongSome bold text/strong If you turn the strong text back into b, then it's not clear which of the three options you should use. Unless I'm misunderstanding... joel -- [ joel

Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread joel boonstra
not going to have to end up maintaining this, so the best answer is the one that works the best for the OP. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: preg guru question

2004-02-14 Thread joel boonstra
there are so many parens. IOW, Adam's is better ;) [0]: The one I posted was: '/img src=[\'](.*?)\.(.*?)[\']/i' which didn't require quotes to match each other, didn't allow for arbitrary whitespace, and didn't allow for XHTML-style tag closing. -- [ joel boonstra | gospelcom.net ] -- PHP General

Re: [PHP] Browser Detection another page

2004-02-13 Thread joel boonstra
in another 2 cents? :o) I guess that was more like 10 cents. Feel free to continue this off-list if you want to discuss more. This really doesn't have much to do with PHP anymore ;) joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] preg guru question

2004-02-13 Thread joel boonstra
)) { print_r($matches); } } ? 'Course, it still doesn't match multiple images in one line. preg_match_all() could probably help out there. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg guru question

2004-02-13 Thread joel boonstra
On Fri, Feb 13, 2004 at 02:19:11PM -0500, joel boonstra wrote: snip if (preg_match('/img src=[\'](.*?)\.(.*?)[\']/ig', $dah, $matches)) { print_r($matches); } Doh! The '/ig' should just be '/i'. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http

Re: [PHP] Browser Detection another page

2004-02-13 Thread joel boonstra
CSS to support handheld browsers, without having to duplicate content or do browser sniffing. -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browser Detection another page

2004-02-12 Thread joel boonstra
-sniffing to serve different content is a bad idea. /$.02 -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] weird header() (bug may be)

2004-02-11 Thread joel boonstra
'){ header('Location: http://www.example.com/to_another_page.php') ; exit(); }else { do another thing in here } header('Location: http://www.example.com/to_previous_page.php'); exit(); // for good measure joel -- [ joel boonstra | gospelcom.net ] -- PHP

Re: [PHP] Can PHP redirects be detected?

2004-02-09 Thread joel boonstra
that the listing is innacurate. etc... -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can PHP redirects be detected?

2004-02-09 Thread joel boonstra
is indexed. I have nothing to back this up other than trying it out with some sites, and watching the results (with Google) over a few months, but it makes sense to me. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
the location of your script relative to the document root, and it works with more functions than just include() and require(). I have found it to be the cleanest, most reliable, and most portable way to deal with file paths. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
, it can contain whatever you want. Unless I'm misunderstanding what you're saying... joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
On Thu, Feb 05, 2004 at 05:42:54PM -0500, joel boonstra wrote: snip # ini_set(): ini_set('include_path', {$_SERVER['DOCUMENT_ROOT']}:.); Replying to myself, it appears that PHP = 4.3.0 has a family of functions specifically for tweaking include_path: http://www.php.net/manual/en

Re: [PHP] An array curiosity....

2004-01-26 Thread joel boonstra
a trailing comma for an element that is now the last one, or adding one to previous elements when adding items to the list is a small but useful timesaver. Perl does this as well. I'm not sure which other languages do, but I like it. -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List

Re: [PHP] content management

2004-01-26 Thread joel boonstra
interface, which is Perl). joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with preg_replace

2004-01-19 Thread joel boonstra
. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using PHP with Style Sheets

2004-01-19 Thread joel boonstra
in response to that request. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with preg_replace

2004-01-19 Thread joel boonstra
http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL] blah AFTER: blah Foo blah Next time, I'll test out my answers before I give 'em. HTH! -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] odd and even numbers

2004-01-16 Thread joel boonstra
negate the result of your modulus operator, and take advantage of the fact that 0 is false, and 1 is true: function isOdd ($value) { return !((int)$value % 2); } -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] odd and even numbers

2004-01-16 Thread joel boonstra
an answer. -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Looping problem?

2004-01-06 Thread joel boonstra
specifying which columns you want. That way, if your database schema changes (e.g., you add two more columns), your code won't break. joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Looping problem?

2004-01-06 Thread joel boonstra
On Tue, Jan 06, 2004 at 05:33:41PM -0500, joel boonstra wrote: snip I would recommend not simply doing a select *, but rather specifying which columns you want. That way, if your database schema changes (e.g., you add two more columns), your code won't break. And, responding to myself

Re: [PHP] Adding X days to a time string...

2003-11-21 Thread joel boonstra
); ? Such a handy function -- no need to worry about leap years, number of days in a month, etc... -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Web Based File Management and Security

2003-07-01 Thread joel boonstra
, and have your server uncompress it and (optionally) create a directory structure matching the contents of that .zip. The 'gallery' image gallery software does .zip file uploading, and it's quite handy. Just a thought, joel -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http

Re: [PHP] Include Bug?

2003-06-06 Thread joel boonstra
matching in the current working directory will take precedence over the one in your site root. So keep that in mind... -- [ joel boonstra | gospelcom.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: slideshow/flush

2003-02-17 Thread Joel Boonstra
. You have to talk to the server, and then have the client periodically poll the server to see what new data it should get. I think. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Fw: HTTP_REFERER work without a problem....

2003-01-16 Thread Joel Boonstra
making even a temporary id based on the IP address unreliable, and perhaps frustrating if your site keeps 'forgetting' things about the user. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Defaults in drop down list...

2003-01-07 Thread Joel Boonstra
-reviewer what's going on. So it requires more documentation. * you run the risk of stepping on pre-existing variables. However, the upside, namely, eliminating a *ton* of code, is attractive enough to me that I use this for most select boxes I do. Joel -- [ joel boonstra | [EMAIL PROTECTED

[PHP] Re: PHP Auto-Responder

2002-12-17 Thread Joel Boonstra
think), and OSX and Linux have, well, everything. Otherwise, you could try an online cron service. Like: http://www.cronservice.com/ I have no idea how reliable they are, etc..., but it's likely cheaper than hosting with a new place. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP

[PHP] Re: Array Searching

2002-11-15 Thread Joel Boonstra
/en/function.in-array.php if you're not sure what key 'foo' will be at, or this: http://www.php.net/manual/en/function.array-search.php if you're not sure what key 'foo' will be at and you want to know what that key is. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing

[PHP] RE: Why $ on variable names?

2002-11-12 Thread Joel Boonstra
with variables that didn't have something in front of them to separate them from barewords. Oh well. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Does anyone know if this is possible?

2002-11-04 Thread Joel Boonstra
, and then pass the data to a perl script to format and save it to a file. Or maybe sprintf() does everything you need... Joel (more on perl formats: http://www.perl.com/doc/manual/html/pod/perlform.html) -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net

[PHP] Re: Sessions are acting strangely

2002-10-28 Thread Joel Boonstra
to see if this is a common issue that their customers have? -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: hidden PATH_INFO

2002-09-25 Thread Joel Boonstra
a rewrite. There also may be another way to do it in Apache, but I don't think there's anything in PHP you can do to accomplish this. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: filter files in a directory

2002-08-26 Thread Joel Boonstra
on the whole array. When a new file needs to be filtered, simply add an entry to the array, keeping your code more-or-less clean. It's up to you, though. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: stripping quotes from urls and images

2002-07-31 Thread Joel Boonstra
. Good luck! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Auto Increment Problems....

2002-07-30 Thread Joel Boonstra
is, then, as you already said, you're doing the wrong thing. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sendmail return-path from my virtual webhost

2002-07-29 Thread Joel Boonstra
more help... Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Comma question

2002-07-23 Thread Joel Boonstra
using {} everywhere I embed variables in strings, but I was unaware that stuff like this: This is a $variable embedded in a string might no longer work. If you have URLs, I'd love to read up on this. Thanks! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http

[PHP] Re: Pine config

2002-07-23 Thread Joel Boonstra
to Pine's config screen (m, s, c), searching for 'index-format' (w index-format enter), and hitting CTRL-G to bring up the help. HTH! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Exporting mySQL Table Data to .csv

2002-07-10 Thread Joel Boonstra
), but it does exactly what you want: http://oss.gospelcom.net/staff.php The first tool listed there is called 'cvsdump' -- it dumps, processes, and mails a MySQL table in CVS. HTH! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Re: banner rotation and advertisement

2002-07-10 Thread Joel Boonstra
Try phpadsnews. phpAdsNew can be found on SourceForge here: http://sourceforge.net/projects/phpadsnew/ I've been using it in production for over a year now, and have found it to be quite a handy program. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http

[PHP] Re: alphabetizing titles when first word begins with 'The','A',etc.

2002-04-18 Thread Joel Boonstra
what order they were inserted in, artificially munging your data, or anything else. HTH! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why doesnt this work???

2002-03-20 Thread Joel Boonstra
. Of course, all the other advice ('==' instead of '=', '' instead of 'and', etc...) should be heeded as well... -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache Server Side Includes mixed with PHP pages

2002-02-28 Thread Joel Boonstra
. Why you would want this, I don't know, since PHP is much more fully featured than SSI, and can do everything SSI can. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] wordwrap not working

2002-02-20 Thread Joel Boonstra
output. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] wordwrap not working

2002-02-20 Thread Joel Boonstra
-- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDF4PHP Class

2002-02-18 Thread Joel Boonstra
modules required, nothing to compile. Just unzip, and it works (more or less). The only potential sticky point is that it writes to /tmp when images are involved, so if that's a problem for whatever reason, you'll need to change one line. Otherwise, it works great! -- [ joel boonstra | [EMAIL

Re: [PHP] prev next links

2002-02-04 Thread Joel Boonstra
that sort of logic yourself. Hope that helps! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] prev next links

2002-02-04 Thread Joel Boonstra
-syntax-error-ridden version: ?php $prev_link = http://yourdomain.com/?$prev_year-$prev_month-$prev_day;; $next_link = http://yourdomain.com/?$next_year-$next_month-$next_day;; ? Sorry! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] How to call method from another class

2002-01-28 Thread Joel Boonstra
. Otherwise, I don't think it's possible... -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] function scope question

2002-01-24 Thread Joel Boonstra
to recall that this sort of thing should work in a more strict OO language, like C++. I'm using PHP 4.0.6, if that's important. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: [PHP] PHP Chat REALTIME

2002-01-22 Thread Joel Boonstra
it, but it definitely looks to be worthwhile. -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] PHP ssi

2001-12-25 Thread Joel Boonstra
allowing your PHP script to execute and output SSI, which would then get parsed by the server and be executed, again. Why you would need this, I don't know. As people already mentioned, SSI's very limited capabilities should all be available in PHP. Joel -- [ joel boonstra | [EMAIL PROTECTED

Re: [PHP] Images

2001-12-20 Thread Joel Boonstra
header for a gif, and then the following string: http://www.mysite.com/myimage.gif and that's not valid contents for a .gif file. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands