I want two functions. First function stores info, while the second one displays the info. How would I get the second function to display all that is stored in $info_id and $info_title?
function get_info()
{
$dbc = get_dbc();
$info = mysqli_query($dbc, "SELECT info_id, info_title FROM text") or die("Error: ".mysqli_error($dbc));
while ($info_row = mysqli_fetch_array($info))
{
$info_id = $info_row['info_id'];
$info_title = $info_row['info_title'];
}
}
You can split that function into two using the following approach:
You then can call the functions the following way: