jQuery - few values in selector function
<p>I have simple selector function inside php script</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {
    // create a new date and insert it
    var myDate = new Date(&lt;?php echo $date; ?&gt;)
    $.countdown('#&lt;?php echo $ei_id; ?&gt;', myDate);
});
&lt;/script&gt;
</code></pre>

<p>This script transfer a value of 'myDate' into next js script</p>

<pre><code>jQuery.countdown = function(selector, dateValue) {
    var dateV = dateValue;
};
</code></pre>

<p>But I must transfer another one variable f.ex. <code>$time</code> from first to second script.
I try to make it via simple js table (compare variables <code>$time</code> and <code>$date</code> into one via this simple table) but the php script is working with <code>while() {}</code> and in this situation in second script I have always only the last value of <code>$time</code> from <code>while()</code> loop. </p>

<p>Probably it must be done in jquery style but I don't know how.</p>

<hr>

<p>A php file</p>

<pre><code>while (){

$time = '10,10';
$ei_id = abc;
$date = '2012,03,10';

?&gt;
    &lt;script&gt;
    $(document).ready(function() {
        // create a new date and insert it
        var myDate = new Date(&lt;?php echo $date; ?&gt;)
        $.countdown('#&lt;?php echo $ei_id; ?&gt;', myDate);
    });
    &lt;/script&gt;

&lt;script type="text/javascript" src="js_external.js"&gt;&lt;/script&gt;

&lt;?php
}
</code></pre>

<p>// of course, values of $time, $date, $ei_id are generated from dBase - into external js file always must be sending this three variables. At this moment I have two variables, must add thid third.</p>

<p>a js_external.js file</p>

<pre><code>jQuery.countdown = function(selector, dateValue) {
    var dateV = dateValue;

    // here I must have a value of $time from php file

};
</code></pre>
