I'm an experienced CF developer taking my first stab at OSS development. I'm struggling with several translations between the languages and their capabilities, but my current concern is the url. In order to make my urls more search engine friendly, I construct them as follows:
http://domain.com/file.cfm/n1/v1/n2/v2/n3/v3
Given CFs environmental variables and support for lists, I can easily create a custom function to parse this and retrieve the query string and all of its name value pairs. Because I'm so new to PHP, though, I don't have the tools yet to manipulate the language in a sophisticated manner. How can I extract the required variables from the url above to end up with $n1="v1", $n2="v2" and $n3="v3"?
Also, a couple of quick questions:
- Does PHP support dot notation for structures/associative arrays?
- Is there a function to format a date (similar to DateFormat() in CF)?
- Is there an easier way to reference URL variables other than $HTTP_GET_VARS["var"]?
- Given a typical query string (e.g. ?n=v&n2=v2 ), how do I access the entire query string as a whole?
- Is there a GOOD book someone can recommend for an advanced developer new to PHP? I've got Wrox's "Beginning PHP" and Sams' "PHP Developer's Cookbook", but am incredibly disappointed with both.
I'm running PHP4 against a MySQL database on W2K. I've got a ton of other quickie questions, but I'll save them for another time.
Any help is greatly appreciated. I know this is a large post that covers a lot of ground, but like all new beginnings this is pretty frustrating. Thanks for all of the help I am (and will be) posting here.