[Solved] PHP Warning: strpos() expects parameter 1 to be string, array given


From the error $post_id is an array. An example of strpos

$mystring = 'abc';
$findme="a";
$pos = strpos($mystring, $findme);

In your code print_r($post_id) to see containing values

 strpos($post_id, 'user_')//here $post_id is array

solved PHP Warning: strpos() expects parameter 1 to be string, array given