Jump to content

Table row as an Array


IndianaGuy
 Share

Recommended Posts

How do I make an entire row into an Array so I can send it back? this page was triggered from an Ajax request. Thank you

 

Thank you

 $sql = "SELECT * FROM tblMedia WHERE Med_name= '$selected_expo' ";
 $result = mysqli_query($conn, $sql);
        if (mysqli_num_rows($result) == 1) {
            $row = mysqli_fetch_assoc($result);
            // make the entire row into an array so I can send it back to Ajax request page                
        }
        else {
             echo "<h3 class='ui-title'>Multiple records found.</h3>";
        }

Edited by IndianaGuy
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...