Thanks,

I've got a couple of students who are competing with each and me to
write the most efficient calls, and I'm anticipating their fisrt
question on Monday.  Bit sad at this time on a Friday night .....

On May 14, 10:41 pm, Simon J Welsh <[email protected]> wrote:
> You could also use list($address) = explode('#', $innerRow
> ['PeopEmail']), which does the same thing as array_shift, but without  
> an extra function call.
>
> No matter what you pick, it'll be either two inbuilt function calls or  
> a language construct and an inbuilt function call, so you'll probably  
> need a heck of a lot of iterations before you'll notice one being  
> marginally faster than another.
>
> As for each one is better, that's totally a matter of taste.
>
> On 14/05/2010, at 10:33 PM, yeosteve wrote:
>
>
>
>
>
> > Hi
>
> > I have a field in a database with
> > [email protected]#mailto:[email protected]#  .  I want to reduce it
> > to just the email address.
>
> > Is is better/faster to use
>
> > substr($innerRow['PeopEmail'],0,strpos($innerRow['PeopEmail'],'#'))
>
> > or
>
> > array_shift(explode('#',$innerRow['PeopEmail']))
>
> > Thanks
>
> > Steve
>
> ---
> Simon Welsh
> Admin ofhttp://simon.geek.nz/
>
> Who said Microsoft never created a bug-free program? The blue screen  
> never, ever crashes!
>
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
>
> --
> NZ PHP Users Group:http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to