rn14 Posted February 21, 2007 Share Posted February 21, 2007 Im trying to pass the values returned to the variable $to so that a message is sent to each number individualy but it only sends it to one number not them all $query = "SELECT `mobile` FROM `customer`"; $result = mysql_query($query) or die(mysql_error()); $number = array(); while(list($mobile) = mysql_fetch_row($result)) { $number[] = $mobile; } // Test it foreach($number as $mobile) { echo $mobile . "<br>"; } $user = "xxxx"; $password = ""; $api_id = ""; $baseurl ="http://api.clickatell.com"; $text = $_POST['text']; $to = $mobile; Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 21, 2007 Share Posted February 21, 2007 what happens if you do print_r($number); Quote Link to comment Share on other sites More sharing options...
rn14 Posted February 21, 2007 Author Share Posted February 21, 2007 It prints out the values. I think im overlaying the previously stored value in the $to variable each time through the loop? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.