php - preg_replace(): Parameter mismatch, laravel -


if(isset($newsportid['hockey'])){      $entries['hockey']['sport_id'] = (isset($newsportid['hockey'])) ? $newsportid['hockey'] : '';     $entries['hockey']['team_name'] = (isset($multisports[0]['team_name'])) ? $multisports[0]['team_name'] : '';     $entries['hockey']['position'] = (isset($multisports[0]['position_id'])) ? $multisports[0]['position_id'] : '';     $entries['hockey']['shot'] = (isset($multisports[0]['shot'])) ? $multisports[0]['shot'] : ''; }  if(isset($newsportid['soccer'])){      $entries['soccer']['sport_id'] = (isset($newsportid['soccer'])) ? $newsportid['soccer'] : '';     $entries['soccer']['position'] = (isset($multisports[1]['position_id'])) ? $multisports[1]['position_id'] : '';     $entries['soccer']['team_name'] = (isset($multisports[1]['team_name'])) ? $multisports[1]['team_name'] : ''; }  foreach($entries $key=>$entry){     //$pos_id = $this->getsportposition($postions, $sport_id);       $user_sport = new usersport;      $user_sport->user_id = $user->user_id;     $user_sport->sport_id = (isset($entry['sport_id'])) ? ($entry['sport_id']) : '';     $user_sport->team_name = (isset($entry['team_name'])) ? ($entry['team_name']) : '';     $user_sport->shot = (isset($entry['shot'])) ? ($entry['shot']) : '';     $user_sport->position_id = (isset($entry['position'])) ? ($entry['position']) : '';     $user_sport->hand = (isset($entry['dominant_hand'])) ? ($entry['dominant_hand']) :  '' ;     $user_sport->handicap = (isset($entry['handicap'])) ? ($entry['handicap']) :  '' ;      $user_sport->save();  } 

when selecting single sports says preg_replace(): parameter mismatch, pattern string while replacement array

while working 2 or more selected sports don't understand problem please suggest how fixed out


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -