Hello i have array as

Array
(
    [1] => Fedora
    [6] => Array
        (
            [0] => Android
            [1] => Selenium
        )

    [200] => Array
        (
            [0] => hi there
            [1] => New
        )
)

how to print this in php using for loop because using normal forloop it says no index for array[0].
i have chnaged array keys.

so sorry,
it was simple:

foreach ($array as $key => $value) 
   {
      if (is_array($value))
     {
         foreach($value as $test)
            echo($test)."<br>";
     }
      else
        {
            echo($value);
            echo "<br><br>";
        }
   }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.