Yh, your question does not justify the error you are having right now. You said PDO but the error is in mysqli. Also you are not querying the database for the $result1 instead fetching the array of a string.