Hello to the community.
Valentine's day,but no flowers for my arrays!!!
Table telephone
| ID | name | tel_numb
| 1 | John | 898989
| 2 | Andy | 676767
| 3 | Lucia | 454545
A firs part of my script display this table like a list with checkable boxes :
$do_get = mysql_query("SELECT * FROM telephone WHERE listID=$listID");
$num_rows = mysql_numrows($do_get);
while ($results = mysql_fetch_array($do_get)) {
$telID = $results["ID"];
$name = $results["name"];
$tel_numb = $results["tel_numb"];
?>
<form method="post" action="oy_sms_send.php">
<tr>
<td width="7">
<input type="checkbox" name="sendid[]" value="<?php echo $telID; ?>">
</td>
<td width="160"><font size="2" face="Verdana"><?php echo $name; ?></font></td>
<td width="160"><font size="2" face="Verdana"><?php echo $telnumb; ?></font></td>
</tr>
</form>
<?
}
Then the script oy_sms_send.php where I need to get a string with the checked $tel_numb separated by commas,like "898989,676767,454545" (suposing all the boxes checked) :
if(count($sendid) > 0){
$me_ignorant = implode(",",$sendid);}
//now $me_ignorant is = "1,2,3"
$poor_me= mysql_query("SELECT tel_numb from telephone where ID in ($me_ignorant)");
while ($row = mysql_fetch_array($poor_me)){
//FIRST ERROR : now $row is = "ArrayArrayArray"
//Why all these Arrays?One Array every row?!
//then...
$me_idiot = implode(",",$row);
//of course bad result:
//$me_idiot is = "898989,898989676767,676767454545,454545"
//I'm going mad....
}
Do,please anybody has idea about the way I can obtain
a simple string with the telephone numbers separated by commas??
Thank you very much....