אשכול: עזרה עם For.
View Single Post
ישן 04-11-06, 22:18   # 9
RS324
תודה על תרומתך.
 
מיני פרופיל
תאריך הצטרפות: May 2006
הודעות: 3,173

RS324 לא מחובר  

מאד פשוט

PHP קוד:
    $out "<script type=\"text/javascript\">";
    
$out .= "var myarray = array();";
    
$i 0;
    
$query mysql_query("some query here");
    
    while (
$row mysql_fetch_array($query))
    {
        
$out .= "myarray[$i] = $row[title]";
$i++;
    }
    
$out .= "</script>";
    
    echo 
$out
משהו כזה...

Last edited by RS324; 04-11-06 at 22:24..
  Reply With Quote