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

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

PHP - HTML
Could anyone give me some GOOD sample links for php - html email tutorial.

Thanks!

xml
<?php

echo "<h1>XML Articles</h1>";

$home

RadioButtonList data selection
view plaincopy to clipboardprint?

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

trim function issues
Hi guys, total noob here...

So I've been tinkering around with a html and am using php to em

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