[PHP] Parsing Current Server Domain
Does anyone know how I would parse the domain that scripts are currently being executed in? For example: I use seperate domains for development and production. There are times I have to specify a hard coded url instead of a relative one. So for the development it would be; dev.domain.com/somefile.php where on the live site it would be www.domain.com/somefile.php I would like the script to be able to parse the domain part so it would be; $currentdomain/somefile.php AAny suggestions would be greatly appreciated. Jeff Pearson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: [PHP] PHP Editor - which to use?
I like to use Edit Plus. www.editplus.com It has the syntax highlighting for php, perl, java, and many others through modules that are downloadable from their web site, DOESNT change code like dreamweaver does and its cheap ($25). Jeff Pearson - Original Message - From: "Ruessel, Jan" <[EMAIL PROTECTED]> Date: Monday, September 22, 2003 2:00 am Subject: RE: [PHP] PHP Editor - which to use? > well, i like to use dreamweaver mx or textpad with the syntax highlighting > file you additionally have to download. i dunno if there are special "php- > must-have-editors". > grtz > jan > > -Original Message- > From: Binay [EMAIL PROTECTED] > Sent: Montag, 22. September 2003 10:58 > To: [EMAIL PROTECTED] > Subject: [PHP] PHP Editor - which to use? > > > Hi everybody! > > Please suggest me a good PHP editor like ( Microsoft's Interdev for ASP) > to write my php programs/scripts and get a visual feel. > > > Thanks > Binay > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] interview
How about the Presidential election?!! On Apr 13, 2006, at 9:23 AM, Jay Blanchard wrote: [snip] Great, now the interviewee will be able to cheat. Way to go Jay. [/snip] *blush* I know. I wonder where we could apply, that way we can skew the results so that the cheating doesn't matter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Grouping
OK. I know I did this a LONG time ago but I don't remember how I did it. Thus, my post. I have a list of last names from a MySQL database. I need to display them grouped by the first letter of their last names and insert a separator on display. Similar to a phone book. So it looks like; A ___ Adams Apple Army B __ Banjo Bank Bark C __ Captain Car Is there a way without jumping through too many hoops? Thanks for any input you can give. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Determining number of days in a selected month
The java mailing list I belong to recently had this same conversation. I didn't know php had that ability built in. Java doesn't (score another one for php). The cleanest solution I saw on the Java list that would be non-language specific (in other words, the same logic can be implemented in ANY language) would be to set a variable to the first day of the month AHEAD of the month you want. For example, if your looking for February, 2000, set the variable to be March 1st, 2000. Then subtract 1 day. I have actually archived this solution in my own little knowledge base as I thought it was quite clever. Hope this helps other people as well. Jeff Pearson On Jan 20, 2006, at 8:17 AM, <[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote: date("t") will give you the number of days in the current month. Or you can do: date("t", mktime(0, 0, 0, $month, $day, $year)) to get the number of days in a specific month in a specific year (that way you can get leap year accurate counts..) -TG = = = Original message = = = Is there a way to easily tell PHP how many days there are in a selected month without writing the following out for each month: if($Month == "January") ~$NumberOfDays = 31; elseif($Month == "February") ~if($Year == "A Leap Year") ~~$NumberOfDays = 29; ~ ~elseif($Year != "A Leap Year") ~~$NumberOfDays = 28; ~ elseif($Month == "March") ~$NumberOfDays = 31; and so on, and so on, and so on I would greatly appreciate any help. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php