[PHP] Re: Dissecting an email address

2003-11-02 Thread Joachim Krebs
Hi there, First, we have to realize that in an email there can be more than one period, but we only want to remove the top level domain. The solution? Remove the top level domain to begin with - You may be able to do that using explode() and the limit argument, but this was easier, in my

Re: [PHP] recursive acronym - PHP

2003-11-02 Thread Joachim Krebs
Perhaps it is time to break the record. Evan Nemerson wrote: How can you forget the Hurd??? http://www.gnu.org/software/hurd/hurd.html#name: According to Thomas Bushnell, BSG, the primary architect of the Hurd: `Hurd' stands for `Hird of Unix-Replacing Daemons'. And, then, `Hird' stands for

[PHP] References and memory efficiency

2003-11-01 Thread Joachim Krebs
Hi there, I've been working on a database wrapper class for a while now, MySQL to be specific. Until now, I've simply had a fetch function that returned an array of all the rows that the database returned, only because I have gotten so tired of always writing the same while loop to iterate

[PHP] Re: Persisting MySQL connection accross scripts

2003-11-01 Thread Joachim Krebs
With persistent connections, you actually have to have the mysql_pconnect statement in each script you want to use the connection in. The function will use an already-existing connection if one is available. If no existing connection could be found, it will initiate the link. The manual at

Re: [PHP] recursive acronym - PHP

2003-11-01 Thread Joachim Krebs
Or LAME for Lame Ain't an MP3 Encoder Larry E . Ullman wrote: Why PHP is a recursive acronym?, I know that before was called Personal Home Page, I now is Hypertext PreProcessor, but why is recursive?, I person told me that it could be wroten as Pre Hypertxt Processor, thanks. PHP stands for

[PHP] Re: eliminating dupes from MySQL query results

2003-11-01 Thread Joachim Krebs
Look into the DISTINCT keyword for MySQL. Robb Kerr wrote: It's not exactly a Php problem, but MySQL and Php seem to be so intertwined and this newsgroup has been so unbelievably helpful that I thought I'd post the question here. I've got a query which returns a group of records. the field which

[PHP] Re: Got myself confused

2003-10-25 Thread Joachim Krebs
Jesus. How drunk were you when you concocted this mess? Joachim Tom Wollaston wrote: I have been trying to write some code for a simple menu system. The idea was that every item on a menu should be tied to anouther to give a menu structure. To do this I have tried to use the following code. Some

Re: [PHP] Code optimization: single vs. double quotes?

2003-10-24 Thread Joachim Krebs
That style is also the one I use. It works well, it is clean, and it is straightforward. Joachim Richard Baskett wrote: on 10/24/03 0:47, Nathan Taylor at [EMAIL PROTECTED] wrote: I am a recent fan of the single-quotes. I used to use double only but when some gurus told me the disadvantages

Re: [PHP] Is it possible to Include a php source file ?

2003-02-23 Thread Joachim Krebs
include() include_once() require() require_once() Look those functions up in the PHP docs. On 23 February 2003 at 21:32:46, Rohin Gosling wrote: First up, I sent this same message a few hours ago, but I do not see it in the news group, and neither does it appear in my sent

Re: [PHP] string manipulation

2003-02-20 Thread Joachim Krebs
This is the best method echo substr(strrchr($string, $char), 1); On 21 February 2003 at 00:13:02, Gregory Heinrichs wrote: little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it

[PHP] open_basedir Option

2003-02-19 Thread Joachim Krebs
How do I set the php.ini setting open_basedir on a per-directory basis? Ideally, I would like to set it using .htaccess files... Joachim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Adding slashes

2003-02-19 Thread Joachim Krebs
PHP seems to automatically be escaping quotes on my $_POST variables. Am I talking rubbish, or is this some setting? It is annoying me greatly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array declarations

2003-02-18 Thread Joachim Krebs
Is there any speed difference at all from the following two code blocks (miniscule or not)? If so, which is faster? $cfg[db][host] = ; $cfg[db][user] = ; $cfg[db][pass] = ; or $cfg[db] = array(host=, user=, pass=); Joachim -- PHP General Mailing List

[PHP] Multisorting an array

2003-02-17 Thread Joachim Krebs
I have an array with the following structure: Array ( [0] = Array ( [name] = images [type] = dir ) [1] = Array ( [name] = includes [type] = dir ) [2] = Array ( [name] = index.php

Re[2]: [PHP] save all vars in a url to a var?

2002-08-18 Thread Joachim Krebs
For a list of common system variables, refer to: http://cs-people.bu.edu/stevec/cs101/02s/php5_system.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php