Jump to content

Matching array with string.


XpertWorlock

Recommended Posts

if you mean to loop:

for ($i=0; $i<6; $i++) {

  switch ($i) {

      case 5:

            echo "6 Times looped, call array":

            echo array[0].array[1].array[2];

      break;

  }

}

 

or if u mean.

 

foreach ($array in $key=>$value ) {

  if ($key == 2 ){

    $array_scaned = true;

  }

}

 

What you're asking isn't quite making sense to me, but if I think I understand you right:

 

<?php
$list = array('Jeff', 6, 6);

// strings equal 6
if ($string1 == '6' && $string2 == '6') {
  // do stuff with array
}
?>

 

You might want to consult some basic programming tutorials to learn things like boolean comparisons, among other things...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.