I have the following old PHP code that worked fine:
<?php
$query = "SELECT * FROM notes WHERE note_name='Test Note'";
$result = mysql_query($query);
$note1 = mysql_result($result, 0, "note_content");
$note2 = mysql_result($result, 1, "note_content");
echo "<p>$note1</p>
<p>$note2</p>"
?>
I want to convert it to mysqli. I did the following to convert it but it is not working:
<?php
$query = "SELECT * FROM notes WHERE note_name='Test Note'";
$result = mysqli_query($connect, $query);
// THIS IS WHERE I AM UNSURE WHAT TO DO??? HERE'S WHAT I TRIED
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
$note1 = $row["note_content"][0];
$note2 = $row["note_content"][1];
echo "<p>$note1</p>
<p>$note2</p>"
?>
What am I doing wrong?