sonic656
07-17-2012, 10:00 AM
var names = ["Chris", "Kate", "Steve"]; //some values
for(var i in names) {alert(names[i]);}
Hi. This is script that I use in JavaScript. I need to get it working in PHP.
This is not working:
//$_GET['emails']="test@test.com, blablabla@bla.com"; //some values
$Emails = explode(",",strip_tags($_GET['emails']));
for($i in $Emails) {
if(smail($subject, $message, "no-reply@website.com", $Emails[$i])) {echo "sent to:".$Emails[$i]."<br />";}
}
error:
Parse error: syntax error, unexpected T_STRING, expecting ';' in localhost/www/send.php on line 33
How to get it woking?
PS: Function of this script in JavaScript: It will alert one name by another from array.
PS 2: sry for my english :D
for(var i in names) {alert(names[i]);}
Hi. This is script that I use in JavaScript. I need to get it working in PHP.
This is not working:
//$_GET['emails']="test@test.com, blablabla@bla.com"; //some values
$Emails = explode(",",strip_tags($_GET['emails']));
for($i in $Emails) {
if(smail($subject, $message, "no-reply@website.com", $Emails[$i])) {echo "sent to:".$Emails[$i]."<br />";}
}
error:
Parse error: syntax error, unexpected T_STRING, expecting ';' in localhost/www/send.php on line 33
How to get it woking?
PS: Function of this script in JavaScript: It will alert one name by another from array.
PS 2: sry for my english :D