removing unnecessary duplicate php from codeblock