🔒 Closed Help

Status
Not open for further replies.

KevinCosme2358

Enthusiast
Balak namin ilagay yung href=tel: sa . $row["contactnumber"] para i wewebview namin yung html sa android, para sa app maciclick yung contact number and pwd macall if gusto.



if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<br> Contact Name: ". $row["Contactname"]. "</br> Position: ". $row["position"]. "</br> Contact Number: " . $row["contactnumber"] . "<br>";
 
Gulo ng code mo iho haha ganito mas madali

PHP:
if(!empty($result->num_rows)){

  // loop along each row
 while($row = $result->fetch_assoc_array()){

  // Create vars for each
  $contact_name = $row['Contactname'];
  $position = $row['position'];
  $contact_number = $row['contactnumber'];

  // Echo
  echo "
    <br>
    Contact Name: $contact_name<br>
    Position: $position<br>
    Contact Number: <a href='tel:$contact_number'>$contact_number</a>
  ";
 }
}

Anything inside this -> "double" will be parsed kaya pwede mo na i-set beforehand. Kagaya ng ginawa ko sa taas. :)
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 3
    Replies
  • 646
    Views
  • 3
    Participants
Last reply from:
andre_sentro

Online now

Members online
626
Guests online
673
Total visitors
1,299

Forum statistics

Threads
2,275,122
Posts
28,960,772
Members
1,233,600
Latest member
Emmanuel1011
Back
Top