🔒 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
  • 672
    Views
  • 3
    Participants
Last reply from:
andre_sentro

Trending Topics

Online now

Members online
1,141
Guests online
3,681
Total visitors
4,822

Forum statistics

Threads
2,306,629
Posts
29,173,075
Members
1,193,956
Latest member
Rence653
Back
Top