Php Declare Function In Javascript