3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( array('Pedigree Dry', 'N/A', 'N/A', 'N/A'), array('Professional Range', 'N/A', 'N/A', 'N/A'), array('Pedigree Wet', 'N/A', 'N/A', 'N/A'), array('PMM', 'N/A', 'N/A', 'N/A'), array('Chappi', 'N/A', 'N/A', 'N/A'), array('Care & Treat', 'N/A', 'N/A', 'N/A'), array('Sheba', 'N/A', 'N/A', 'N/A'), array('Whiskas Dry', 'N/A', 'N/A', 'N/A'), array('Whiskas Wet', 'N/A', 'N/A', 'N/A'), ); foreach($data as $inner_array) str_replace("N/A", 0, $inner_array); print_r($data);
Output for 4.3.0 - 7.1.0
Array ( [0] => Array ( [0] => Pedigree Dry [1] => N/A [2] => N/A [3] => N/A ) [1] => Array ( [0] => Professional Range [1] => N/A [2] => N/A [3] => N/A ) [2] => Array ( [0] => Pedigree Wet [1] => N/A [2] => N/A [3] => N/A ) [3] => Array ( [0] => PMM [1] => N/A [2] => N/A [3] => N/A ) [4] => Array ( [0] => Chappi [1] => N/A [2] => N/A [3] => N/A ) [5] => Array ( [0] => Care & Treat [1] => N/A [2] => N/A [3] => N/A ) [6] => Array ( [0] => Sheba [1] => N/A [2] => N/A [3] => N/A ) [7] => Array ( [0] => Whiskas Dry [1] => N/A [2] => N/A [3] => N/A ) [8] => Array ( [0] => Whiskas Wet [1] => N/A [2] => N/A [3] => N/A ) )