Can anybody help me fix the error Warning: sizeof(): Parameter must be an array or an object that implements Countable using PHP 7.2 line that gives me an array is $inside_color_count = sizeof( $response->exteriorColor[ $i ]->genericColor );
[php]$color = array();
$colour_count = sizeof( $response->exteriorColor );
$i = 0;
while (!empty($colour_count) && $colour_count > $i ) {
$inside_color_count = sizeof( $response->exteriorColor[ $i ]->genericColor );
if ( ( !in_array( $response->exteriorColor[ $i ]->genericColor->name, $color, true ) ) &&
( $inside_color_count < 2 ) )
array_push( $color, $response->exteriorColor[ $i ]->genericColor->name );
if ( $inside_color_count > 1 ) {
$j = 0;
while ( $j < $inside_color_count ) {
if ( ( !in_array( $response->exteriorColor[ $i ]->genericColor->name, $color, true ) ) )
array_push( $color, $response->exteriorColor[ $i ]->genericColor[ $j ]->name );
$j++;
}
}
$i++;
}[/php]