Re: [nyphp-talk] Many pages: one script

2007-08-05 Thread Graham Hagger
We actually do this at my work. I don't have the details to hand, but it basically involves setting the apache document root to be your actual script, ie. index.php. That way no matter what url you request you will always hit that page. The script then examines the url that was requested to

Re: [nyphp-talk] Removing one element from an array

2007-07-09 Thread Graham Hagger
Hi David, Ran into this myself a short time ago. There's probably a better answer, but I ended using array_diff. Basically I pass in the original array, and a new single element array containing the element to remove, and pocket the difference. To (kinda) rewrite the manual/online help fo

Re: [nyphp-talk] single quote vs. double quote

2007-04-04 Thread Graham Hagger
While I agree wholeheartedly it's important to note that Paul Houle wrote: > > > gets the desired effect. The long form also lets you do cool things > with arrays and object, like > > "{$my_array[$index]}" > "{$my_array["i_can_really_use_quotes_to_have_a_string_here"]}" > "{$object->special

Re: [nyphp-talk] Loading array from file

2007-04-04 Thread Graham Hagger
David, I recently had to do some work with our companies meeting room booking system, which was originally based on the open source PHP based MRBS project that's out there somewhere. For their internationalization they had used separate include files for each language, with the correct one being