micmania1 Posted May 25, 2008 Share Posted May 25, 2008 foreach ($_POST['game_id'] as $v) { if (is_numeric($_POST['gameweek'][$v])) { $gameweek[$v] = $_POST['gameweek'][$v]; } else { $update_errors[$v]['gameweek'] = 'Invalid gameweek.'; } } The problem is this line: $gameweek[$v] = $_POST['gameweek'][$v]; Wht is the problem with this? Link to comment https://forums.phpfreaks.com/topic/107159-solved-warning-cannot-use-a-scalar-value-as-an-array-in/ Share on other sites More sharing options...
micmania1 Posted May 25, 2008 Author Share Posted May 25, 2008 $gameweek has already been set. I changed the array value to $gw[$v] and it works fine now. Link to comment https://forums.phpfreaks.com/topic/107159-solved-warning-cannot-use-a-scalar-value-as-an-array-in/#findComment-549423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.