I have a question. I get a variable from a DB lets call it carnumber with:
$data = mysql_fetch_array($result);
then to see the carnumber:
echo $data["carnumber"];
And now i need this carnumber in a javascript function with a for loop:
function example(text){
var mdstring ="";
var i=0;
var s;
var carnr = **"**<?php echo $data["carnumber"];?>**"**;
for(i=0;i<carnr;i++){
//run MD5
}
s=plain;
return s;
}
But this example does not work. Either with quotes (in strong) or without quotes. So how can i fix this mistake, that I can use my $data["carnumber"] in the javascript function?
best regards