How can i pass php string 2 javascript var??
I want 2 do somting like: Var time = $time;
10x 4 Adv
Nits~
if the $time comes from a form then you must put the follow
var time=document.form.time.value;
The Time$ is php var from: time$ = data('~~~');
I want 2 pass this var (Time$) 2 javascript var in the same page..
Exp:
<? $time = data('~~~'); ?>
<script>
-- </script>
??
Php is server based and javascript is client based. You can output javascript the same way you output html.
<?php
$time = "9";
?>
--
When you run index.php the output in browser will be <script>