473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Passing value from PHP to JavaScript

i am new to php, can someone helpme

This is php code
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. $test1=100;
  4. $test2=200;
  5. $test3=300;
  6.  
  7. ?>
this is java script
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.       function test() {
  3.         var data = [  100,    1000,10000];
  4. </script>
can i get value of $test1,$test2,$test3 and replace value data with $test1,$test2,$test3
Jun 9 '12 #1
1 1472
Rabbit
12,516 Expert Mod 8TB
Use a PHP block to echo the values of the variables.
Jun 10 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Eric Wagar | last post by:
I have a phpnuke website, and I use DigiChat chat. Since I have users who register, I'd like to be able to pass there username and email (at a minimum) into the chat system, so they do not have to...
11
by: HolaGoogle | last post by:
Hi, Sorrryy to ask such basic question but i do need your help! Here's what i'm trying to do: In my parent form i'm calling a my Iframe form to get certain value, then depending on that value...
3
by: michael | last post by:
let me keep it clean, quick and simple. I am passing a variable into another window and am reassigning the value on the new page - window.document...value = opener.document. ....value and...
2
by: sangram | last post by:
Passing value from parent to child window created by Pop up
2
by: Larry | last post by:
anyone have an example of passing a value from a radio button to a JavaScript function in ASP.net? <input type="radio" value="text_play" name="play_type" checked="checked" /> this is the type...
4
idsanjeev
by: idsanjeev | last post by:
SIR I AM PASSING VALUE FROM ONE FORM TO ANOTHER FORM THROUGH COOKIES BUT IS CAN ONLY TRANSFER LAST VALUE HOW CAN PASS VALUE AFTER CLICKIN ON LINK I AM USING THE CODE IS FOR LINK <td><a...
3
by: JJ | last post by:
I am using a handler (processImage.ashx) to display an image. The image is displayed according to parameters passed in the querystring. The handerl is called via some clientside javascript. I...
1
by: sva0008 | last post by:
hi , I am using. <input type=button class=tbox value="Populate SA" style="width: 90%"...
10
by: perhapscwk | last post by:
how to passing value from popup to the parent window as a variable which I can access and process the variable(string) in parent window? such as from popup page, we have var_from_popup="abc",...
5
by: aelred | last post by:
I have a web page where a member can open up a chat window (child window) with another member. - From there the member can also navigate to other web pages. - From other pages in the site, they...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.