how to add mobile number fetching of database insert into array -
I have a table with 2 calories, "id" and "mobile", I get all the mobile numbers of the database Insert this array in array like ['to'] = array ("mobile_number1", "mobile_number2", "mobile_number3", ..., "in the previous database in the mobile database"); How to change this code for my request:
DBConnect (); // connect function $ result = DB_Select ("SELECT * fROM bs_Content"); $ Num_rows = mysqli_num_rows ($ result); While ($ line = mysqli_fetch_assoc ($ result)) {$ i = $ row ['id']; $ Id [$ i] = $ line ['mobile']; } ($ I = 1; $ i & lt; = $ num_rows; $ i ++) {print_r ($ id [$ i]); } DB_Disconnect (); // Total I like the array ("938000 9 0010", "9380002020", "930002021");
Try it ..
$ numbers []; While ($ line = mysqli_fetch_assoc ($ result)) {$ numbers [] = $ line ['mobile']; }
Comments
Post a Comment