Ahoy Me LASSY,
Which of the two codes would be most efficient? having a conditional statement inside the loop favoring length, or having the conditional statementsd outside of the loop… yarr yaar yaaaaar yaaaaaaaaaaaar
This is peusedo code, for something im working on btw.
<?php
function xxxx($xxx) {
foreach ($xxx as $xyy){
if ( $xxx && $xxy && $xyy ) {
// do something
}else{
//do something else
}
}
}
function xxxx($xxx) {
if ( $xxx && $xxy && $xyy ) {
foreach ($xxx as $yy){
//do something
}
}else{
foreach ($xxx as $yy){
//do something else
}
}
}
?>
ahoy!!! forgot to put in the TAGS! YEHAWW