In terms of what is faster, I tend to do:
echo microtime();
for($i=0; $i<1000; $i++)
{
//some code;
}
echo microtime();
Ideally it would be best to get them to make some function that does
more
$a = microtime(); //some code; $b = microtime();
function give_nice_time_message($a, $b)
{
echo 'the time takes was ': //some maths with $a and $b (more
complicated than a-b)
}
Otherwise you have to keep counting the decimal places with your index
finger.
On May 14, 11:33 pm, yeosteve <[email protected]> wrote:
> Because it gave me a parse error. However in two steps it works
>
> $arrMail = explode('#', $innerRow['PeopEmail']);
> echo $arrMail[0];
>
> Maybe I should set my class a project to find 10 ways of achieving the
> same thing
>
> On May 14, 11:02 pm, Simon J Welsh <[email protected]> wrote:
>
>
>
> > On 14/05/2010, at 11:00 PM, Rimu Atkinson wrote:
>
> > > I don't understand why you would use array_shift to get the first
> > > element of an array when you can just go array[0]? Is this not valid
> > > PHP: explode('#', $innerRow['PeopEmail'])[0]? (genuine question)
>
> > Sadly, no. That notation only works on variables.
> > ---
> > 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]
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]