foreach help.


Posted on 16th Feb 2014 07:03 pm by admin

Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my code is correct:

Code: $sql = "SELECT email from mail_list where subcribed = "Y" ";

$rs = mssql_query( $sql, $conn )
or die( "Err EXE" );
$row = mssql_fetch_array( $rs );

foreach($row["email"] as $email)
{
$to = "$email";
$re = "Newsletter";
$msg = "The latest Newsletter is ready for download nnThank You";
$headers = "From: No-Reply@doamin.com rn";
}
Hard to test as I dont want to start sending out rouge emails

Many Thanks

No comments posted yet

Your Answer:

Login to answer
85 Like 44 Dislike
Previous forums Next forums
Other forums

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

update sql when refresh - php
hi
I have made a table (attachement)

the users can update the sql database using + or x bu

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

re calling a function without including file
Hi,
i am new to programming in php, i was just checking the wordpress code and found out in the w

Pro-rata Billing in Periodic Billing for Rental
Hi guys,

We have a situation, where a rental contract starts at the mid of the month say

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash