Whats wrong with this PHP Array - TechRepublic
Question
February 22, 2008 at 07:44 AM
larson

Whats wrong with this PHP Array

by larson . Updated 17 years, 10 months ago

if ($record != “” & $record2 != “”)
{
for ($iArray = 0; $iArray < count($record); $iArray++) { for ($iArray2 = 0; $iArray2 < count($record2); $iArray++) { if ($record[$iArray] = $record2[$iArray2]) { $record3[$iArray] = $record2[$iArray2]; } } } return $record3; } I'm trying to make a Array for a search by comparing if array 2 is equal to array 1 then keep it else, discard it.

This discussion is locked

All Comments