Moves php code from view to client.