Palce a PHP avariable into JQuery Script

Posted on 2014-02-01
Last Modified: 2014-02-01
How do you place a PHP variable into a JQuey Script?
See currentAmount: below.
$gaol = "23";

goalProgress: function(options) {
var defaults = {
goalAmount: 100,
speed: 1000,
textBefore: '',
textAfter: '',
milestoneNumber: 70,
milestoneClass: 'almost-full',
callback: function() {}



Open in new window

Question by:rgranlund
LVL 43

Accepted Solution

Chris Stanyon earned 500 total points
ID: 39826886
Just echo it :)

currentAmount: <?php echo $goal; ?>,

Open in new window


Author Closing Comment

ID: 39826892

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 25
Use a select control to call a javascript function 5 29
php string masking 4 29
datetime in sql 6 28
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now