[Tex/LaTex] Set font style to Courier New and font size of 10pt in framed

fontsfontsize

I would like to change the font from Times New Roman to Courier New in the framed environment and it should have a font size of 10pt.

Here my current coding:

\begin{lstlisting}
define("USE_PCONNECT", false);
####### LOCAL CONFIGARATION  #######
define("SERVER","localhost");
define("USER","root");
define("PASSWORD","");
define("DB","learning");
\end{lstlisting}   

In my document file:

\usepackage{listings}
\lstset{
numberstyle=\small, 
numbersep=10pt, 
frame = single, 
language=PHP
}

Best Answer

Besides the hints reg. how to ask questions, here a possible solution:

\documentclass[a4paper,10pt]{article}

\usepackage[T1]{fontenc}

\usepackage{listings}
\lstset{%
  basicstyle  = \fontfamily{pcr}\fontsize{10pt}{12pt}\selectfont ,
  numberstyle = \small , 
  numbersep   = 10pt   , 
  frame       = single , 
  language    = PHP
}

\begin{document}

\begin{lstlisting}
define("USE_PCONNECT", false);
####### LOCAL CONFIGARATION  #######
define("SERVER","localhost");
define("USER","root");
define("PASSWORD","");
define("DB","learning");
\end{lstlisting}

\end{document}