Re: [PHP] Problem with arrays

2005-06-24 Thread Kevin L'Huillier
On 24/06/05, Josh Olson <[EMAIL PROTECTED]> wrote: > for ($i = 0; $i < count($array1); i++) > $array1[$i][] = $array2[$i]; > > from kevin l'huillier That's basically what Mike wrote (only with array_push instead of []), and Bob improved upon. And they d

Re: [PHP] Can't even make a simple test RSS feed

2005-06-24 Thread Kevin L'Huillier
On 6/24/05, Brian Dunning <[EMAIL PROTECTED]> wrote: > What am I doing wrong? This doesn't work. The browser does not even > load the page, no error or anything: The script looks fine and executed as expected on my machine. Try executing it from the command-line. Often if nothing loads in the

Re: [PHP] Re: Strange notation to create object

2005-06-24 Thread Kevin L'Huillier
On 24/06/05, Jason Barnett <[EMAIL PROTECTED]> wrote: > OK I'm pretty clear on it, but now I wonder: is variable assignment (=) > the only place where the Zend Engine will copy a reference instead of > reference the reference? In PHP 4, function arguments work the same way. Unless you use the ref

Re: [PHP] Re: A Bug in string ' e

2005-06-26 Thread Kevin L'Huillier
> Are you viewing this via a web server? It's probably returning > content-type text/html, which means that you might need to > htmlspecialchars() that string. That's what i was thinking. It looks like how some browsers would render that string. Could you copy the relevant code into a message?

Re: [PHP] Re: A Bug in string ' e

2005-06-26 Thread Kevin L'Huillier
On 26/06/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > Kevin L'Huillier wrote: > > Could you copy the relevant code into a message? > > Sure, either set the content-type to text/plain (to see the raw string > rather than have the browser interpret it as HTM

Re: [PHP] Re: $mydata->StampDate

2005-06-27 Thread Kevin L'Huillier
On 27/06/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > John Taylor-Johnston wrote: > > I could just change the field type. But how do you calculate it? I don't > > see much to inspire a start. I'm not a full-time coder either. More of a > > tinkerer. I don't want someone to do it for me, bu

Re: [PHP] removing chars from string

2005-06-27 Thread Kevin L'Huillier
Paul Nowosielski <[EMAIL PROTECTED]> wrote: > If a have a string thats 11 characters long how can I strip off the last > two characters? Jay Blanchard <[EMAIL PROTECTED]> wrote: > $newString = substr($oldString, 0, 8); > echo $newString; substr's third argument is length, not position. It also a

Re: [PHP] Breaking up data efficiently

2005-06-27 Thread Kevin L'Huillier
I agree, your implementation is efficient. It does depend on the data being entirely proper, however. If you can not be entirely sure (and you should rarely be), i might add a suggestion that increases code length, but decreases the chance of problems: You might consider creating a function to v

Re: [PHP] ad management

2005-06-27 Thread Kevin L'Huillier
On 27/06/05, Sebastian <[EMAIL PROTECTED]> wrote: > i am looking for a simple ad management app to keep track of ad > views/impressions. i was looking at phpadsnews, but it seems way too > much bloat of what i need i to do. I am not aware of any such package, however you may way to keep in mind th

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-27 Thread Kevin L'Huillier
On 27/06/05, Dr. Brad Lustick <[EMAIL PROTECTED]> wrote: > I'm a novice trying to understand the exact construction of code for doing an > HTTP 301 permanent redirect for a server > coded in PHP. Could someone please tell me how I would handle the following > example? > > http://www.nimblepedic.

Re: [PHP] Breaking up data efficiently

2005-06-28 Thread Kevin L'Huillier
> In my opinion you should save exceptions for, well, EXCEPTIONal > problems. Either that or you use exceptions for a large system that > discriminates against specific types of errors and handles each error > type in a totally different way. Can we say bloat? Depending on the system, malformatt

Re: [PHP] turn off the www

2005-06-29 Thread Kevin L'Huillier
> > Wouldn't > > > > $newUrl = 'https://' . substr( $_SERVER['SERVER_NAME'], 4 ) > > > > be a _hell_ of a lot faster? > > If one considers micro-seconds 'a _hell_ of a lot faster', then _maybe_ And it could be slower if you avoid sending someone from http://example.com/ to https://ple.co