How to run PHP Inside Javascript -
How do I run PHP inside the following JavaScript to solve this problem?
Here's my PHP:
& lt ;? Php query_posts ('post_type = calendar'); If (is_pause ()): while (is_pause ()): the_post (); ? & Gt; {Title: '& lt ;? Php the_field ('program_title'); ? & Gt; ', Url:' & lt ;? Php the_field ('link'); ? & Gt; ', Begin:' & lt ;? Php the_field ('start_date'); ? & Gt; ', Inter:' & lt ;? Php the_field ('end_date'); ? & Gt; '}, & Lt ;? Php timeline; end if; ? & Gt;
This is my JavaScript:
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# calendar'). Full calendar ({header: {left: 'previous, next to next', center: 'title', correct: 'month, basic, basic ''}, Editable: false, eventLimit: true, // Allow too many incidents to "more" links: [PHP goes here}});}; & lt; / script & gt;
Since I can not comment
I'm assuming the_field ( ) Returning the value of some type of function output What is the value? If not, then try to output it
{title: '
This can happen to you in this scenario.
Comments
Post a Comment