array create new array with if php code example Example: php array $array = ['cheese', 'ham', 'potato']; var_dump($array);