I want to insert a php statement into a jQuery String to update the user profile dynamically.
Here is my not working code so far:
jQueryVarWP("#kreis1").append("<option value=\""+array_list[i]+"\"<?php selected("+array_list[i]+", get_the_author_meta( \"kreis\", \$user->ID ) );?> >"+array_list[i]+"</option>");
My problem is somewhere here:
"<?php selected("+array_list[i]+", get_the_author_meta( \"kreis\", \$user->ID ) );?>
Maybe someone can help me to build this string.