Php Declare Function Inside Function Javascript Code For A Simple